教程·Javascript 中文手册
This reference is organized around the 函数ality of the JavaScript language. Sometimes you already know the name of an object or method, but don't know precisely where to look for it. This chapter contains tables of links to aid in this situation.
is a list of all JavaScript operators, grouped by type of operator.
is an alphabetical list of all JavaScript statements.
is an alphabetical list of all of JavaScript's predefined classes and objects. The predefined methods and properties for each object are listed.
is an alphabetical list of all predefined methods, regardless of the object to which they belong. The second column indicates the object with which the method is associated. There are separate entries for methods of the same name used in different objects. Each method name links to the method in the indicated object.
Similarly, is an alphabetical list of all predefined properties, regardless of the object to which they belong. The second column indicates the object with which the property is associated.
is an alphabetical list of JavaScript's global 函数s. These are 函数s which aren't associated with any object.
is an alphabetical list of all JavaScript event handlers.
If there is an entry in both the Client Version and the Server Version columns for a single construct, that construct is part of the core language. Otherwise, it is defined only for the client or for the server, as indicated.
The version number indicates the versions of Netscape Navigator (Nav), LiveWire (LW), or the Netscape servers (Svr), such as Enterprise Server and FastTrack Server), for which the construct is defined.
表 1 Operators
| Operator Category | Operator | Client version | Serverversion |
|---|---|---|---|
| LW 1 | |||
| ++ | Nav 2 | LW 1 | |
| - | Nav 2 | LW 1 | |
| -- | Nav 2 | LW 1 | |
| * | Nav 2 | LW 1 | |
| / | Nav 2 | LW 1 | |
| % | Nav 2 | LW 1 | |
| LW 1 | |||
| += | Nav 2 | LW 1 | |
| LW 1 | |||
| || | Nav 2 | LW 1 | |
| ! | Nav 2 | LW 1 | |
| LW 1 | |||
| ^ | Nav 2 | LW 1 | |
| | | Nav 2 | LW 1 | |
| ~ | Nav 2 | LW 1 | |
| << | Nav 2 | LW 1 | |
| >> | Nav 2 | LW 1 | |
| >>> | Nav 2 | LW 1 | |
| LW 1 | |||
| += | Nav 2 | LW 1 | |
| -= | Nav 2 | LW 1 | |
| *= | Nav 2 | LW 1 | |
| /= | Nav 2 | LW 1 | |
| %= | Nav 2 | LW 1 | |
| &= | Nav 2 | LW 1 | |
| ^= | Nav 2 | LW 1 | |
| |= | Nav 2 | LW 1 | |
| <<= | Nav 2 | LW 1 | |
| >>= | Nav 2 | LW 1 | |
| >>>= | Nav 2 | LW 1 | |
| LW 1 | |||
| != | Nav 2 | LW 1 | |
| > | Nav 2 | LW 1 | |
| >= | Nav 2 | LW 1 | |
| < | Nav 2 | LW 1 | |
| <= | Nav 2 | LW 1 | |
| LW 1 | |||
| , | Nav 2 | LW 1 | |
| LW 1 | LW 1 | LW 1 | |
| LW 1 | LW 1 | -- |
表 2 Statements
| Statement | Client version | Serverversion |
|---|---|---|
| LW 1+ | LW 1+ | LW 1+ |
| Svr 3 | Svr 3 | Svr 3 |
| LW 1+ | LW 1+ | LW 1+ |
| LW 1+ | Svr 3 | Svr 3 |
| LW 1+ | Svr 3 | LW 1+ |
| LW 1+ | LW 1+ | -- |
| Object | Clientversion | Serverversion | Methods | Properties | Eventhandlers |
|---|---|---|---|---|---|
| onMouseUp | onFocus | onMouseUp | onFocus | onSubmit | onLoad |
| onMouseOver | onMouseOver | onFocus | onFocus | onFocus | onFocus |
| onFocus | onSelect | onSelect | onUnload | -- | -- |
表 3 Objects with their methods and properties
表 4 Methods
表 5 Properties
表 6 Global 函数s
| 函数 | Clientversion | Serverversion |
|---|---|---|
| addClient | -- | LW 1+ |
| addResponseHeader | -- | Svr 3 |
| blob | -- | LW 1+ |
| callC | -- | LW 1+ |
| debug | -- | LW 1+ |
| deleteResponseHeader | -- | Svr 3 |
| escape | Nav 2+ | LW 1+ |
| eval | Nav 2+ | LW 1+ |
| flush | -- | LW 1+ |
| getOptionValue | -- | LW 1+ |
| getOptionValueCount | -- | LW 1+ |
| isNaN | Nav 3+ | LW 1+ |
| Number | Nav 4 | Svr 3 |
| parseFloat | Nav 3+ | LW 1+ |
| parseInt | Nav 3+ | LW 1+ |
| redirect | -- | LW 1+ |
| registerC函数 | -- | LW 1+ |
| ssjs_generateClientID | -- | Svr 3 |
| ssjs_getCGIVariable | -- | Svr 3 |
| ssjs_getClientID | -- | Svr 3 |
| String | Nav 4 | Svr 3 |
| taint | Nav 3 | LW 1+ |
| unescape | Nav 2+ | LW 1+ |
| untaint | Nav 3 | LW 1+ |
| write | -- | LW 1+ |
表 7 Event handlers
| Event handler | Clientversion | Handler for |
|---|---|---|
| onAbort | Nav 3+ | Image |
| onBlur | Nav 3+ | Button,FileUpload | , Password, Reset, Submit, Textarea, Window
| onChange | Nav 3+ | FileUpload,Text | , Textarea
| onClick | Nav 3+ | Button,document | , Radio, Submit
| onDblClick | Nav 4 | document,Link |
| onDragDrop | Nav 4 | Window |
| onError | Nav 3+ | Image,Window |
| onFocus | Nav 3+ | Button,FileUpload | , Password, Reset, Submit, Textarea, Window
| onKeyDown | Nav 4 | document,Link | , Textarea
| onKeyPress | Nav 4 | document,Link | , Textarea
| onKeyUp | Nav 4 | document,Link | , Textarea
| onLoad | Nav 3+ | Image,Window |
| onMouseDown | Nav 4 | Button,Link |
| onMouseMove | Nav 4 | -- |
| onMouseOut | Nav 3+ | Layer,Link |
| onMouseOver | Nav 3+ | Layer,Link |
| onMouseUp | Nav 4 | Button,Link |
| onMove | Nav 4 | Window |
| onReset | Nav 3+ | Form |
| onResize | Nav 4 | Window |
| onSelect | Nav 3+ | Text,Textarea |
| onSubmit | Nav 3+ | Form |
| onUnload | Nav 3+ | Window |