Skip to end of metadata
Go to start of metadata

The ondblclick event activates when an element is double-clicked with the mouse.  The event can be specified as a JavaScript expression or the name of a JavaScript function.  

If an expression is used, the JavaScript keyword this refers to the element that was double-clicked.  

If the name of a function is used, the function will receive 2 parameters when called: 

  • The browser event object
  • A reference to the element that was double-clicked

Examples:

The following code will hide the element once it's double-clicked.

ondblclick: this.style.visibility = "hidden";

Labels
  • No labels