hallo is there a way to grab an event without having to modify the html code?
For example, in this code I use the onmouseover event but I need to modify the html by adding the "onmouseover...":
My question is if I can, in an external file, refer to mylink and use the onmouseover event, without having to modify the html. Somehitng like:
in my html
in my script.js
For example, in this code I use the onmouseover event but I need to modify the html by adding the "onmouseover...":
Code:
<a id="mylink" href="" onmouseover="alert('An onMouseOver event');return false">Test</a>
My question is if I can, in an external file, refer to mylink and use the onmouseover event, without having to modify the html. Somehitng like:
in my html
Code:
<a id="mylink" href="">Test</a>
in my script.js
Code:
if (mylink.onmouseover) then doThis()
else