IT学习者 -> 技术文档 -> JavaScript语言参考手册
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.

表 1, "Operators," is a list of all JavaScript operators, grouped by type of operator.

表 2, "Statements," is an alphabetical list of all JavaScript statements.

表 3, "Objects with their methods and properties," is an alphabetical list of all of JavaScript's predefined classes and objects. The predefined methods and properties for each object are listed.

表 4, "Methods," 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, 表 5, "Properties," 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.

表 6, "Global 函数s," is an alphabetical list of JavaScript's global 函数s. These are 函数s which aren't associated with any object.

表 7, "Event handlers," is an alphabetical list of all JavaScript event handlers.

Key to the versions
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
Server
version
Arithmetic Operators + 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
String Operators + Nav 2 LW 1
+= Nav 2 LW 1
Logical Operators && Nav 2 LW 1
|| Nav 2 LW 1
! Nav 2 LW 1
Bitwise Operators & 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
Assignment Operators = 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
>>>= Nav 2 LW 1
Comparison Operators == Nav 2 LW 1
!= Nav 2 LW 1
> Nav 2 LW 1
>= Nav 2 LW 1
< Nav 2 LW 1
<= Nav 2 LW 1
Special Operators ?: Nav 2 LW 1
, Nav 2 LW 1
delete Nav 2 LW 1
new Nav 2 LW 1
this Nav 2 LW 1
typeof Nav 3 LW 1
void Nav 3 LW 1

  表 2 Statements  
Statement Client
version
Server
version
break Nav 2+ LW 1+
comment Nav 2+ LW 1+
continue Nav 2+ LW 1+
delete Nav 4 Svr 3
do...while Nav 4 Svr 3
export Nav 4 Svr 3
for Nav 2+ LW 1+
for...in Nav 2+ LW 1+
函数 Nav 2+ LW 1+
if...else Nav 2+ LW 1+
import Nav 4 Svr 3
labeled Nav 4 Svr 3
return Nav 2+ LW 1+
switch Nav 4 Svr 3
var Nav 2+ LW 1+
while Nav 2+ LW 1+
with Nav 2+ LW 1+

  表 3 Objects with their methods and properties  
Object Client
version
Server
version
Methods Properties Event
handlers
Anchor Nav 2+  
Applet Nav 3+
Area
(see Link)
Nav 3+
Array Nav 3+ (2 as non-object) LW 1+ concat
join
pop
push
reverse
shift
slice
splice
sort
toString
unshift
index
input
length
prototype
blob LW 1+ blobImage
blobLink
Boolean Nav 3+ LW 1+ toString prototype
Button Nav 2+ blur
click
focus
handleEvent
form
name
type
value
onBlur
onClick
onFocus
onMouseDown
onMouseUp
Checkbox Nav 2+ blur
click
focus
handleEvent
checked
defaultChecked
form
name
type
value
onBlur
onClick
onFocus
client LW 1+ destroy
expiration
Connection Svr 3 beginTransaction
commitTransaction
connected
cursor
execute
majorErrorCode
majorErrorMessage
minorErrorCode
minorErrorMessage
release
rollbackTransaction
SQL表
storedProc
toString
prototype
Cursor LW 1+ close
columnName
columns
deleteRow
insertRow
next
updateRow
cursorColumn
prototype
database LW 1+ beginTransaction
commitTransaction
connect
connected
cursor
disconnect
execute
majorErrorCode
majorErrorMessage
minorErrorCode
minorErrorMessage
rollbackTransaction
SQL表
storedProc
storedProcArgs toString
prototype
Date Nav 2+ LW 1+ getDate
getDay
getHours
getMinutes
getMonth
getSeconds
getTime
getTimezoneOffset
getYear
parse
setDate
setHours
setMinutes
setMonth
setSeconds
setTime
setYear
toGMTString
toLocaleString
UTC
prototype
DbPool Svr 3 DbPool
connect
connected
connection
disconnect
majorErrorCode
majorErrorMessage
minorErrorCode
minorErrorMessage
storedProcArgs
toString
document Nav 2+ captureEvents
close
getSelection
handleEvent
open
releaseEvents
routeEvent
write
writeln
alinkColor
anchors
applets
bgColor
cookie
domain
embeds
fgColor
formName
forms
images
lastModified
layers
linkColor
links
plugins
referrer
title
URL
vlinkColor
onClick
onDblClick
onKeyDown
onKeyPress
onKeyUp
onMouseDown
onMouseUp
event Nav 4 data
height
layerX
layerY
modifiers
pageX
pageY
screenX
screenY
target
type
which
width
File LW 1+ byteToString
clearError
close
eof
error
exists
flush
getLength
getPosition
open
read
readByte
readln
setPosition
stringToByte
write
writeByte
writeln
prototype
FileUpload Nav 2+ blur
focus
handleEvent
select
form
name
type
value
onBlur
onChange
onFocus
Form Nav 2+ handleEvent
reset
submit
action
elements
encoding
length
方法
name
target
onReset
onSubmit
Frame
(see Window)
Nav 2+
函数 Nav 3+ LW 1+ toString arguments
arity
caller
prototype
Hidden Nav 2+ form
name
type
value
History Nav 2+ back
forward
go
current
length
next
previous
Image Nav 3+ handleEvent border
complete
height
hspace
lowsrc
name
prototype
src       
vspace
width
onAbort
onError
onKeyDown
onKeyPress
onKeyUp
onLoad
Layer Nav 4 captureEvents
handleEvent
load
moveAbove
moveBelow
moveBy
moveTo
moveToAbsolute
releaseEvents
resizeBy
resizeTo
routeEvent
above
background
bgColor
below
clip.bottom
clip.height
clip.left
clip.right
clip.top
clip.width
document
left
name
pageX
pageY
parentLayer
siblingAbove
siblingBelow
src
top
visibility
zIndex
onBlur onFocus
onLoad
onMouseOut
onMouseOver
Link Nav 2+ handleEvent hash
host
hostname
href
pathname
port
protocol
search
target
text
onClick
onDblClick
onKeyDown
onKeyPress
onKeyUp
onMouseDown
onMouseOut
onMouseUp
onMouseOver
Location Nav 2+ reload
replace
hash
host
hostname
href
pathname
port
protocol
search
Lock Svr 3 isValid lock
unlock
Math Nav 2+ LW 1+ abs
acos
asin
atan
atan2
ceil
cos
exp
floor
log
max
min
pow
random
round
sin
sqrt
tan
E
LN10
LN2
LOG10E
LOG2E
PI
SQRT1_2
SQRT2
MimeType Nav 3+ description
enabledPlugin
suffixes type
navigator Nav 2+ javaEnabled
plugins.refresh
preference
taintEnabled
appCodeName
appName
appVersion
language
mimeTypes
platform
plugins
userAgent
Number Nav 3+ LW 1+ MAX_VALUE
MIN_VALUE
NaN
NEGATIVE_INFINITY
POSITIVE_INFINITY
prototype
Object Nav 2+ LW 1+ eval
toString
unwatch
valueOf
watch
constructor
prototype
Option Nav 2+ defaultSelected
selected
text
value
Password Nav 2+ blur
focus
handleEvent
select
defaultValue
form
name
type
value
onBlur
onFocus
Plugin Nav 3+ description
filename
length
name
project LW 1+ lock
unlock
Radio Nav 2+ blur
click
focus
handleEvent
checked
defaultChecked
form
name
type
value
onBlur
onClick
onFocus
RegExp Nav 4 Svr 3 compile
exec
test
$1, ..., $9
global
ignoreCase
input ($_)
lastIndex
lastMatch ($&)
lastParen ($+)
leftContext ($`)
multiline ($*)
rightContext ($')
source
request LW 1+ agent
imageX
imageY
inputName
ip
方法
protocol
Reset Nav 2+ blur
click
focus
handleEvent
form
name
type
value
onBlur
onClick
onFocus
Resultset Svr 3 close
columnName
columns
next
prototype
screen Nav 4 availHeight
availWidth
colorDepth
height
pixelDepth
width
Select Nav 2+ blur
focus
handleEvent
form
length
name
options
selectedIndex
type
onBlur
onChange
onFocus
SendMail Svr 3 errorCode
errorMessage
send
Bcc
Body
Cc
Errorsto
From
Organization
Replyto
Smtpserver
Subject
To
server LW 1+ lock
unlock
host
hostname
port
protocol
Stproc Svr 3 close
outParamCount
outParameters
resultSet
returnValue
prototype
String Nav 2+ LW 1+ anchor
big
blink
bold
charAt
charCodeAt
concat
fixed
fontcolor
fontsize
fromCharCode
indexOf
italics
lastIndexOf
link
match
replace
search
slice
small
split
strike
sub
substr
substring
sup
toLowerCase
toUpperCase
length
prototype
Submit Nav 2+ blur
click
focus
handleEvent
form
name
type
value
onBlur
onClick
onFocus
Text Nav 2+ blur
focus
handleEvent
select
defaultValue
form
name
type
value
onBlur
onChange
onFocus
onSelect
Textarea Nav 2+ blur
focus
handleEvent
select
defaultValue
form
name
type
value
onBlur
onChange
onFocus
onKeyDown
onKeyPress
onKeyUp
onSelect
Window Nav 2+ alert
back
blur
captureEvents       
clearInterval
clearTimeout
close
confirm
disableExternalCapture
enableExternalCapture
find
focus
forward
handleEvent
home
moveBy
moveTo
open
print
prompt
releaseEvents
resizeBy
resizeTo
routeEvent
scroll
scrollBy
scrollTo
setInterval
setTimeout
stop
closed
defaultStatus
document
frames
history
innerHeight
innerWidth
length
location
locationbar
menubar
name
opener
outerHeight
outerWidth
pageXOffset
pageYOffset
parent
personalbar
scrollbars
self
status
statusbar
toolbar
top
window
onBlur
onDragDrop
onError
onFocus
onLoad
onMove
onResize
onUnload

  表 4 Methods  
Method Of 对象 Client
version
Server
Version
abs Math Nav 2+ LW 1+
acos Math Nav 2+ LW 1+
alert Window Nav 2+
anchor String Nav 2+ LW 1+
asin Math Nav 2+ LW 1+
atan Math Nav 2+ LW 1+
atan2 Math Nav 2+ LW 1+
back History Nav 2+
back Window Nav 4
beginTransaction Connection Svr 3
beginTransaction database LW 1+
big String Nav 2+ LW 1+
blink String Nav 2+ LW 1+
blobImage blob LW 1+
blobLink blob LW 1+
blur Button Nav 2+
blur Checkbox Nav 2+
blur FileUpload Nav 2+
blur Password Nav 2+
blur Radio Nav 2+
blur Reset Nav 2+
blur Select Nav 2+
blur Submit Nav 2+
blur Text Nav 2+
blur Textarea Nav 2+
blur Window Nav 3+
bold String Nav 2+ LW 1+
byteToString File LW 1+
captureEvents document Nav 4
captureEvents Layer Nav 4
captureEvents Window Nav 4
ceil Math Nav 2+ LW 1+
charAt String Nav 2+ LW 1+
charCodeAt String Nav 4 Svr 3
clearError File LW 1+
clearInterval Window Nav 4
clearTimeout Window Nav 2+
click Button Nav 2+
click Checkbox Nav 2+
click Radio Nav 2+
click Reset Nav 2+
click Submit Nav 2+
close Cursor LW 1+
close document Nav 2+
close File LW 1+
close Resultset Svr 3
close Stproc Svr 3
close Window Nav 2+
columnName Cursor LW 1+
columnName Resultset Svr 3
columns Cursor LW 1+
columns Resultset Svr 3
commitTransaction Connection Svr 3
commitTransaction database LW 1+
compile RegExp Nav 4 Svr 3
concat Array Nav 4 Svr 3
concat String Nav 4 Svr 3
confirm Window Nav 2+
connect database LW 1+
connect DbPool Svr 3
connected Connection Svr 3
connected database LW 1+
connected DbPool Svr 3
connection DbPool Svr 3
cos Math Nav 2+ LW 1+
cursor Connection Svr 3
cursor database LW 1+
DbPool DbPool Svr 3
deleteRow Cursor LW 1+
destroy client LW 1+
disableExternalCapture Window Nav 4
disconnect database LW 1+
disconnect DbPool Svr 3
enableExternalCapture Window Nav 4
eof File LW 1+
error File LW 1+
errorCode SendMail Svr 3
errorMessage SendMail Svr 3
eval Object Nav 3 LW 1+
exec RegExp Nav 4 Svr 3
execute Connection Svr 3
execute database LW 1+
exists File LW 1+
exp Math Nav 2+ LW 1+
expiration client LW 1+
find Window Nav 4
fixed String Nav 2+ LW 1+
floor Math Nav 2+ LW 1+
flush File LW 1+
focus Button Nav 2+
focus Checkbox Nav 2+
focus FileUpload Nav 2+
focus Password Nav 2+
focus Radio Nav 2+
focus Reset Nav 2+
focus Select Nav 2+
focus Submit Nav 2+
focus Text Nav 2+
focus Textarea Nav 2+
focus Window Nav 3+
fontcolor String Nav 2+ LW 1+
fontsize String Nav 2+ LW 1+
forward History Nav 2+
forward Window Nav 4
fromCharCode String Nav 4 Svr 3
getDate Date Nav 2+ LW 1+
getDay Date Nav 2+ LW 1+
getHours Date Nav 2+ LW 1+
getLength File LW 1+
getMinutes Date Nav 2+ LW 1+
getMonth Date Nav 2+ LW 1+
getPosition File LW 1+
getSeconds Date Nav 2+ LW 1+
getSelection document Nav 4
getTime Date Nav 2+ LW 1+
getTimezoneOffset Date Nav 2+ LW 1+
getYear Date Nav 2+ LW 1+
go History Nav 2+
handleEvent Button Nav 4
handleEvent Checkbox Nav 4
handleEvent document Nav 4
handleEvent FileUpload Nav 4
handleEvent Form Nav 4
handleEvent Image Nav 4
handleEvent Layer Nav 4
handleEvent Link Nav 4
handleEvent Password Nav 4
handleEvent Radio Nav 4
handleEvent Reset Nav 4
handleEvent Select Nav 4
handleEvent Submit Nav 4
handleEvent Text Nav 4
handleEvent Textarea Nav 4
handleEvent Window Nav 4
home Window Nav 4
indexOf String Nav 2+ LW 1+
insertRow Cursor LW 1+
isValid Lock Svr 3
italics String Nav 2+ LW 1+
javaEnabled navigator Nav 3+
join Array Nav 3+ LW 1+
lastIndexOf String Nav 2+ LW 1+
link String Nav 2+ LW 1+
load Layer Nav 4
lock Lock Svr 3
lock project LW 1+
lock server LW 1+
log Math Nav 2+ LW 1+
majorErrorCode Connection Svr 3
majorErrorCode database LW 1+
majorErrorCode DbPool Svr 3
majorErrorMessage Connection Svr 3
majorErrorMessage database LW 1+
majorErrorMessage DbPool Svr 3
match String Nav 4 Svr 3
max Math Nav 2+ LW 1+
min Math Nav 2+ LW 1+
minorErrorCode Connection Svr 3
minorErrorCode database LW 1+
minorErrorCode DbPool Svr 3
minorErrorMessage Connection Svr 3
minorErrorMessage database LW 1+
minorErrorMessage DbPool Svr 3
moveAbove Layer Nav 4
moveBelow Layer Nav 4
moveBy Layer Nav 4
moveBy Window Nav 4
moveTo Layer Nav 4
moveTo Window Nav 4
moveToAbsolute Layer Nav 4
next Cursor LW 1+
next Resultset Svr 3
open document Nav 2+
open File LW 1+
open Window Nav 2+
outParamCount Stproc Svr 3
outParameters Stproc Svr 3
parse Date Nav 2+ LW 1+
plugins.refresh navigator Nav 3+
pop Array Nav 4 Svr 3
pow Math Nav 2+ LW 1+
preference navigator Nav 4
print Window Nav 4
prompt Window Nav 2+
push Array Nav 4 Svr 3
random Math Nav 2+ LW 1+
read File LW 1+
readByte File LW 1+
readln File LW 1+
refresh navigator.plugins Nav 3+
release Connection Svr 3
releaseEvents document Nav 4
releaseEvents Layer Nav 4
releaseEvents Window Nav 4
reload Location Nav 3+
replace Location Nav 3+
replace String Nav 4 Svr 3
reset Form Nav 3+
resizeBy Layer Nav 4
resizeBy Window Nav 4
resizeTo Layer Nav 4
resizeTo Window Nav 4
resultSet Stproc Svr 3
returnValue Stproc Svr 3
reverse Array Nav 3+ LW 1+</