Cari di JavaScript 
    JavaScript Tutorial
Daftar Isi
(Sebelumnya) JavaScript ReferenceReference : Methods (Berikutnya)

What's in this Reference

This reference is organized around the functionality 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.

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

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

Table 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.

Table 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, Table 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.

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

Table 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.

  • A plus sign after a version number (as in Nav 3+) indicates that the construct is defined for that version and all later versions (In the case of server constructs, LW 1+ indicates the construct was defined for LiveWire 1.0 and continues to be defined in Netscape 3.x servers.)
  • If there is no plus sign (Nav 3) or there is a range (Nav 2-3), the construct was only defined for the named releases.
  • A construct that has existed for more than one release may have had changes between releases. For this information, see the entry for the construct.
 

Table 1 Operators

 
Operator CategoryOperatorClient
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

 Table 2 Statements

 
StatementClient
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+

function

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+

 Table 3 Objects with their methods and properties

 
ObjectClient
version
Server
version
MethodsPropertiesEvent
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
SQLTable
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
SQLTable
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
method
name
target

onReset
onSubmit

Frame
(see Window)

Nav 2+

Function

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


(Sebelumnya) JavaScript ReferenceReference : Methods (Berikutnya)