skip to contentstylized crane logoWhite Crane Education

Button Objects

The button type represents a "command button": <input type="button" value="Button"> =


onblur onclick ondblclick onfocus onmouseenter
onkeydown onkeypress onkeyup onmousedown onmouseup
onmouseleave onmousemove onmouseout onmouseover


form returns a reference to the form to which the control belongs
name returns/sets the value of the button's name attribute
type returns the value of the button's type attribute
value returns/sets the value of the button's value attribute


blur() takes the focus away from the button
click() duplicates a mouse click on the button including causing the onclick event to fire
focus() moves the focus to the button