handle table cell <td> Double Click Event - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:TableData

Description

handle table cell <td> Double Click Event

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
   function doStuff() {/*w ww  . ja  v a 2s  . c  om*/
       console.log( 'Look, ma, I\'m doing stuff!' );
    }

      </script> 
   </head> 
   <body> 
      <table> 
         <tbody>
            <tr> 
               <td ondblclick="doStuff();">Double-click me!</td> 
            </tr> 
         </tbody>
      </table> 
      <input type="button" value="Click me too!" onclick="doStuff();">  
   </body>
</html>

Related Tutorials