11.12.2012 Views

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

JavaScript 2.0-The Complete Reference, Second ... - freecodingtutorial

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

name String holding the name attribute of the element. (IE4+, MOZ/N6+, DOM1)<br />

tabIndex Numeric value indicating the tab order for the object. (IE4+, MOZ/N6+,<br />

DOM1)<br />

type String indicating the type of the button, either "button", "reset", or "submit". (IE4+,<br />

MOZ/N6+, DOM1)<br />

value String containing the text of the value attribute of the button. (IE4+, MOZ/N6+,<br />

DOM1)<br />

Methods<br />

This object only has the methods listed in the Generic HTML Element object found at the<br />

beginning of this section.<br />

Support<br />

Supported in Internet Explorer 4+, Mozilla/Netscape 6+ ( tags are not supported in<br />

Netscape 4), DOM1.<br />

Button, HTMLInputElement (Document Object)<br />

This object corresponds to an tag in the document. It does not<br />

correspond to an occurrence of (see button, immediately preceding). Access to this<br />

object is achieved through standard DOM methods such as document.getElementById() but<br />

is more commonly performed via the elements[] array of the form it is contained in.<br />

Properties<br />

This object has the following properties, in addition to those in the Generic HTML Element<br />

object found at the beginning of this section:<br />

accessKey Single character string indicating the hotkey that gives the element focus.<br />

(IE4+, MOZ/N6+, DOM1)<br />

align String specifying the alignment of the element, for example, "left". (IE4+,<br />

MOZ/N6+, DOM1)<br />

dataFld String specifying which field of a data source is bound to the element. (IE4+)<br />

dataFormatAs String indicating how the element treats data supplied to it. (IE4+)<br />

dataSrc String containing the source of data for data binding. (IE4+)<br />

defaultValue String holding the original value of the value attribute. (IE4+, MOZ/N6+,<br />

DOM1)<br />

disabled Boolean indicating whether the element is disabled (grayed out). (IE4+,<br />

MOZ/N6+, DOM1)<br />

form Read-only reference to the Form in which the button is contained. (IE3+, MOZ,<br />

N2+, DOM1)<br />

name String holding the name attribute of the element. (IE3+, MOZ, N2+, DOM1)<br />

size String indicating the width of the button in pixels. (IE4+, MOZ/N6+, DOM1)<br />

tabIndex Numeric value indicating the tab order for the object. (IE4+, MOZ/N6+,<br />

DOM1)<br />

type Read-only string indicating the type of the field which should be "button". (IE4+,<br />

MOZ, N3+, DOM1)<br />

value String containing the text of the value attribute of the button. (IE3+, MOZ, N2+,<br />

DOM1)<br />

Methods<br />

This object has the following methods, in addition to those in the Generic HTML Element<br />

object found at the beginning of this section:<br />

blur() Causes the button to lose focus. (IE3+, MOZ, N2+, DOM1)<br />

click() Simulates a click on the button. (IE3+, MOZ, N2+, DOM1)<br />

focus() Gives the button focus. (IE3+, MOZ, N2+, DOM1)<br />

handleEvent(event) Causes the Event instance event to be processed by the<br />

appropriate handler of the object. (N4 only)<br />

Support<br />

Supported in Internet Explorer 3+, Mozilla, Netscape 2+, DOM1.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!