
Option
110
|
JavaScript Pocket Reference
toLocaleString()
Returns a localized string representation of the object. The
default implementation of this method simply calls
toString(
)
, but subclasses may override it to provide localization. JS 1.5;
JScript 5.5; ECMA v3.
toString()
Returns a string representation of the object. The implemen-
tation of this method provided by the Object class is quite
generic and does not provide much useful information.
Subclasses of Object typically override this method by
defining their own
toString() method that produces more
useful output. JS 1.0; JScript 2.0; ECMA v1.
valueOf()
Returns the primitive value of the object, if any. For objects of
type Object, this method simply returns the object itself.
Subclasses of Object, such as Number and Boolean, override
this method to return the primitive value associated with the
object. JS 1.1; JScript 2.0; ECMA v1.
See Also
Array, Boolean, Function, Number, String
Option
a selectable option
Client-side JavaScript 1.0
Inherits From: Element
Synopsis
select.options[i]
Constructor
In JavaScript 1.1 and later, Option objects can be created dynami-
cally with the
Option() constructor:
new Option(text, value, defaultSelected, selected)