C.4. Standard Elements

This section details the methods, properties, and events that are common to many objects. The listings within this section only explain the meaning of the items; see the listing for specific objects to determine whether a specific object supports the item listed here.

C.4.1. Standard Methods

MethodsDescription
blurRemoves focus from an object
selectHighlights all or a portion of text in a textarea element
clickTriggers the object's onclick handler
focusApplies focus to an object
handleEvent(event)Calls the handler for a specified event

C.4.2. Standard Properties

PropertiesDescription
constructorA reference to the function that created the object
prototypeA reference to the object's prototype, which can be used to assign additional properties to an object

C.4.3. Standard Event Handlers

Event HandlersDescription
onAbortIs triggered whenever an abort event occurs, such as a user navigating away from a page before it completes loading or clicking the Stop button
onBlurIs triggered when an object loses focus
onClickIs triggered when an object is clicked
onDblClickIs triggered when an object is double-clicked
onErrorIs triggered when a JavaScript syntax or runtime error occurs
onFocusIs triggered when an object obtains focus
onKeyDownIs triggered when a key is pressed
onKeyPressIs triggered when a key is pressed and held down
onKeyUpIs triggered when a key is released
onMouseDownIs triggered when a mouse button is depressed
onMouseOutIs triggered when the mouse pointer is moved ...

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.