topical media & game development

talk show tell print

basic-javascript-06-ch6-examp2.htm / htm



  <html>
  <head>
  <script language="JavaScript" type="text/javascript">
  var numberOfClicks = 0;
  function myButton_onclick()
  {
     numberOfClicks++;
     window.document.form1.myButton.value = 'Button clicked ' + numberOfClicks + 
     ' times';
  }
  </script>
  </head>
  <body>
  <form name=form1>
     <input type='button' name='myButton' value='Button clicked 0 times' 
     onclick="myButton_onclick()">
  </form>
  </body>
  </html>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.