1. <html>
  2. <head>
  3. <script type="text/javascript">
  4. function myEventHandler()
  5. {
  6. alert("You clicked a button");
  7. }
  8. </script>
  9. <body>
  10. <form>
  11. <input type="button" value="Click" onclick="myEventHandler('Thanks for the click')">
  12. </form>
  13. </body>
  14. </html>