I want to write some JavaScript that will change the onmousedown of a div at runtime. So on load a mouse down on the div will do one thing and if a JavaScript function is called a mouse down on the div will do something else. Is this possible?
Share
You can just assign the onMouseDown property.
Keep in mind that javascript properties are case-sensitive. ‘onmousedown’ is all lower-case.