Thursday, April 4, 2013

Javascript Button Object Properties and Event Handlers

The Button object represents a push button.

Button Object Properties
accessKey Sets or returns the keyboard key to access a button
Disabled Sets or returns whether a button should be disabled
Form Returns a reference to the form that contains the button
Id Sets or returns the id of a button
Name Sets or returns the name of a button
tabIndex Sets or returns the tab order for a button
Type Returns the type of form element a button is
Value Sets or returns the text that is displayed on a button

Event Handlers
Onabort Loading of an image is interrupted
Onblur An element loses focus
Onchange The content of a field changes
Onclick Mouse clicks an object
Ondblclick Mouse double-clicks an object
Onerror An error occurs when loading a document or an image
Onfocus An element gets focus
Onkeydown A keyboard key is pressed
Onkeypress A keyboard key is pressed or held down
Onkeyup A keyboard key is released
Onload A page or an image is finished loading
Onmousedown A mouse button is pressed
Onmousemove The mouse is moved
Onmouseout The mouse is moved off an element
Onmouseover The mouse is moved over an element
Onmouseup A mouse button is released
Onreset The reset button is clicked
Onresize A window or frame is resized
Onselect Text is selected
Onsubmit The submit button is clicked
Onunload The user exits the page

No comments:

Post a Comment