- 作者:zhaozj
- 发表时间:2020-12-23 11:01
- 来源:未知
The following objects are available in JavaScript:
anchor applet button checkbox Date document form history link location | Math password radioButton reset selection string submit text textArea window |
NOTE: Each object topic indicates whether the object is part of the client (in Navigator), server (in LiveWire), or is common (built-in to JavaScript). Server objects are not included in this version of the documentation.
anchor object (client)
An anchor is a piece of text identified as the target of a hypertext link.
Syntax
To define an anchor, use standard HTML syntax :
<A NAME="anchorName" anchorText </A>NAME specifies a tag that becomes an available hypertext target within the current document. anchorText specifies the text to display at the anchor.
Description
You can reference the anchor objects in your code by using the anchors property of the document object. The anchors property is an array that contains an entry for each anchor in a document.
xxx to be supplied
Properties
xxx to be suppliedMethods
xxx to be suppliedEvent handlers
None.
Examples
&lt;A NAME=&quot;javascript_intro&quot;&gt;&lt;H2&gt;Welcome to JavaScript&lt;/H2&gt;&lt;/A&gt;See also
link object anchors propertyapplet object (client)
Represents a Java applet. xxx NYI.
Syntax
xxx to be supplied
Description
The applet object executes applets written in Java, not JavaScript. Java applets execute only on Netscape 2.0 and HotJava, and only on 32-bit platforms, such as Windows 95, Windows NT, and Unix. They do not execute on the 16-bit Windows platforms, such as Windows 3.1.
Properties
lengthMethods
xxx to be suppliedEvent handlers
xxx to be suppliedExamples
xxx to be supplied
See also
xxx to be suppliedbutton object (client)
A button object is a pushbutton on an HTML form.
Syntax
<INPUT TYPE="button" NAME="objectName" VALUE="buttonText" [onClick="handlerText"]> NAME specifies the name of the button object as a property of the enclosing form object and can be accessed using the name property. VALUE specifies the label to display on the button face and can be accessed using the value property.Description
The button object is a custom button that you can use to perform an action you define.
Properties
name valueMethods
clickEvent handlers
onClickExamples
A custom button does not necessarily load a new page into the client; it merely executes the script specified by the onClick event handler. In the following example, myfunction() is a JavaScript function.