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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

constructor <strong>Reference</strong> to the constructor object, which created the object. (IE4+<br />

(JScript <strong>2.0</strong>+), MOZ, N3+ (<strong>JavaScript</strong> 1.1+), ECMA Edition 1)<br />

prototype <strong>Reference</strong> to the object‘s prototype. (IE4+ (JScript <strong>2.0</strong>+), MOZ, N3+<br />

(<strong>JavaScript</strong> 1.1+), ECMA Edition 1)<br />

Methods<br />

toString() Returns the string version of the value, either "true" or "false". (IE4+ (JScript<br />

<strong>2.0</strong>+), MOZ, N3+ (<strong>JavaScript</strong> 1.1+), ECMA Edition 1)<br />

valueOf() Returns the primitive Boolean value of the object. (IE4+ (JScript <strong>2.0</strong>+), MOZ,<br />

N3+ (<strong>JavaScript</strong> 1.1+), ECMA Edition 1)<br />

Support<br />

Supported in IE3+ (JScript 1.0+), Mozilla, N3+ (<strong>JavaScript</strong> 1.1+), ECMAScript Edition 1.<br />

Notes<br />

Versions of Netscape prior to 4.06 (and language versions prior to <strong>JavaScript</strong> 1.3) convert<br />

Boolean objects with value false to the primitive false in conditionals. Modern implementations<br />

convert such objects to true.<br />

See Chapters 3 and 7 for examples using Boolean.<br />

br, HTMLBRElement (Document Object)<br />

This document object corresponds to a (linebreak) tag in the document. Access to this<br />

object is achieved through standard DOM methods such as<br />

document.getElementsByTagName().<br />

Properties<br />

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

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

clear String specifying how the element flows with surrounding text. Typical values are<br />

"left", "right", or "all". (IE4+, MOZ/N6+)<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+, DOM1.<br />

button, HTMLButtonElement (Document Object)<br />

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

occurrence of (see Button immediately following). Access to this<br />

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

more commonly through the elements[] array of a Form object.<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 />

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 />

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

MOZ/N6+, DOM1)<br />

form A read-only reference to the Form in which the button is contained, if one exists.<br />

(IE4+, MOZ/N6+, DOM1)

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

Saved successfully!

Ooh no, something went wrong!