Button.onClick : Button : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Button »

 

Button.onClick









Syntax








onClick="command"



The onClick event handler is defined in an tag and specifies what to do when the button is clicked.












<html>
    <form name="myForm">
      <input type="button"
             value="Big Button"
             name="myButton"
             onClick="alert('Click event occurred')">
    </form>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Button