
Element
JavaScript Pocket Reference
|
77
setAttribute(name, value)
Sets the named attribute to the specified string value and
returns nothing.
Event Handlers
Elements of an HTML document define the following event
handlers to respond to raw mouse and keyboard events. Partic-
ular types of elements (such as the Form and Input objects) may
define more specialized event handlers (such as
onsubmit and
onchange) that impose an interpretation upon the raw input
events.
onclick
Invoked when the user clicks on the element.
ondblclick
Invoked when the user double-clicks on the element.
onhelp
Invoked when the user requests help. IE only.
onkeydown
Invoked when the user presses a key.
onkeypress
Invoked when the user presses and releases a key.
onkeyup
Invoked when the user releases a key.
onmousedown
Invoked when the user presses a mouse button.
onmousemove
Invoked when the user moves the mouse.
onmouseout
Invoked when the user moves the mouse off the element.
onmouseover
Invoked when the user moves the mouse over an element.
onmouseup
Invoked when the user releases a mouse button.
See Also
Form, Input, Node, Select, Textarea