Handle validate event from window - Javascript DOM Event

Javascript examples for DOM Event:onload

Description

Handle validate event from window

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/*w ww .ja  va  2  s. c o  m*/
/**
*
* Validate the input.
*/
window.validate = function() {
  console.log("hi");
}
    }

      </script> 
   </head> 
   <body> 
      <button type="button" name="confirm" onclick="validate();return false;">Validate</button>  
   </body>
</html>

Related Tutorials