Add button click action handler function - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Button

Description

Add button click action handler function

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width"> 
   </head> 
   <body> 
      <button onclick="test21()">test</button> 
      <script>
    function test21(){/*from w w  w  .ja  v a 2 s.  co  m*/
      console.log("yey");
    }
  
      </script>  
   </body>
</html>

Related Tutorials