Form JavaScript Tutorial

Syntax

document.form.button.click()
The click() method simulates the click event.


    
    
    
    
                   value="Display alert box"
             name="button1"
             onClick="alert('You clicked the first button.')">

                   value="Call on button 1"
             name="button2"
             onClick="clickFirstButton()">