Form JavaScript Tutorial

Syntax

document.form.button.type
The type property provides access to the TYPE attribute of the button.
This property is a read-only string that always contains button.


    
    
        
    
                   name="4plus2"
             value="(4 + 2)"
             onClick="document.mathForm.answer.value='(4 + 2) = 6'">
                   name="4minus2"
             value="(4 - 2)"
             onClick="document.mathForm.answer.value='(4 - 2) = 2'">

      Answer: