Javascript examples for Function:Function Call
Hover link call function only once
<html> <head> <title>Hover Once</title> </head> <body> <a href="#" onmouseover="onHover(this)">Link 1</a> <a href="#" onmouseover="onHover(this)">Link 2</a> <a href="#" onmouseover="onHover(this)">Link 3</a> <script> function onHover(element) { if(element.alreadyHovered == null) { console.log("call dothis()"); element.alreadyHovered = true; }/*from w w w.j a v a 2 s . c om*/ } </script> </body> </html>