You are on page 1of 150

ex

{Y` 3u
2ubu
1 eu_ u }_ d|
ghasemkiani@gmail.com
http://ghasemkiani.blogspot.com/

Version 2.0 2007-03-26

? {Y` 3u 2uw#

{
N ........................................................................................{Y` 3u 2uw#
>@....................................................................... d} { {Y` 3u
N?................................................................................... {Y` 3u
=MM ..................................................................................................... uI3

=
>
?
M

{Y` 3u ex M

N {Y` 3u 2uw#

{Y` 3u 2uw#

,_ {, u, ,w e}x 2#3^x e{Y` 2uw# ^ {Y` 3u


" } {Y` 3u }w u}_  " .  u HTML u " " 2 2|e
" ,_ d}, {, {Y`, 3u, d"u,w " exu, Y, 3 ,_e e"w
,w| d,w e u}_ eu} { ._e 2uw  e u} b"3
.{ d} { 3 } {Y` 3u

"}

==

,w , 3u, 2u,w# , .{ 3u 2uw# w e}x {Y` 3u 2uw# "}
dw {Y` 3u 2uw# "}  w uw .{ uw C++ 3 C 2uw# "} dux
4 x _ euuw
u "uw  _ euw C++ u 3 C 3u du2uw# w
."  w

K"w 3 ^[_ -3

===

1u,,| .,,3u,,} ,, u,,w K",,w 3 ^, [_ -3,, {Y`,  3u,, "


du,,u 3 ,w| u,} 1u| 1u .e } ^[_ -3 uw uI3_
. } 2u` " K"w 3 ^[_ -3 # uw c

du

==>

u # |e ._e eY[ u u w du # {Y` 3u


._ u} duw } d#uu 3 " dw 3 

0b3

==?

# ,w ,_ e,}3 u, . ,e, 1u| 0b3 uw {Y` 3u "}


-, " eu,} d,0,b3 ,|e, ,3"e w w "} ^
{Y`, 3u, } " ` # _ e ~uw t  _ _ { ._

{Y` 3u ex O

# , ^, e, . ,e, u, { 3, 3,w ,w , ,w |e e_


^ " 2|e  3" "u w eu_ "} }w eu| w b " "}
.{ w " " 2 d  3   "

u|

==M

3 ,w }, ._e eux}X " C++ 3 C | * 3 {Y` 3u


# {Y`, 3u, 3  3"e, "u w | uw [ */ 3 /* {
,| uw 2uuX 3 // { w e}  " ._e - 2
:0u [ ._e - 2 # {Y` 3u 3  3"e "u w
// This is
/*
* This is
* Here is
*/
/* Another

a single-line, C++-style comment.


a multi-line, C-style comment.
the second line.
comment. */ // This too.

uu

==N

.}, u,v,[w 3 ,w| u,} 1u, u, uu {Y` 3u "


,3 0u, , u,w .}, $ 3 _ du,, 3 1u," -3 # `} uu
:0x wu u 2 w # " .uw " ^ ux u ^ d
i
my_variable_name
v13
$str

uI3_

==O

b,| d,w 3 }, {Y`, 3u, 2u,w# # e,w ,# duI3_


u} u 2 w 2|e u #  w uw ." eu du {Y` 3u
: _
break
switch
else
var
instanceof
continue
true
for
with
return

do
typeof
in
catch
throw
finally
while
null
delete

if
case
this
false
void
new
default
try
function

@ {Y` 3u 2uw#

,! , d u}, d,w {Y`, 3u " # duI3  "


:_ u} u 2 w |e u_  # .
abstract
short
interface
extends
char
synchronized
package
goto
debugger
volatile
public

enum
boolean
static
long
final
class
throws
private
implements
double

int
export
byte
super
native
float
const
transient
protected
import

du,%3" 3 u,{, u,w u, 1u, ,_ eu,} u, # ,uw 3 w


Global ,w (,w , u, ,w
4 , :_ u} { 2u` d
,w arguments d,u # w|  " ._  Window 3 Object
.` u} e } u 3 1u 2

u}

=>

:e %#u u 1 var "} # u} uw u}

var i = 1+2+3;
var x = 3, message = 'hello world';

e,3  _ - 2|e " {Y` 3u duw } " u} 1


.{ 1# wu| ^ dw " e du} 1
d  *, , # ,} ^, ", :,* 23w {Y` 3u du}
.uw |e
d#u, u,X d, e, ^, du,{, " w d du}
wu,| ,3 e, du,{, ", ,w u,wu,| 23" " e du} .
,wu {Y`, 3u, d,uw , u,| " d du} .e d#u uX
,wu wu,| 23" " u,| ,, 1 wu| ^ 23" " _ eu} .ewu}
: ", J,w , 3, {Y`, 3u, 3u 3 C++ C - w .ewu}
# 3 } 2 w e | wu| duw 23" " _ eu}
.ewu} wu 2 "u

{Y` 3u ex A

d  du*

=?

e,w u   :_e eux}X " d3w d  * {Y` 3u


eu} * 3 w .u" 3 u : " v_ d  * 3 u}" 3
.} "u| 3 v| du"ux w| du _ " u



=?=

.e  u "3u e}w OM vu " w {Y` 3u " 


u, . ,e, ,u e,} "3u  3  w {Y` 3u
1u," # d}," :e u 0 " w {Y` 3u duw " d
:0u .d"u} du 3 d"u} d"u uw
1
3.14
0001
6.02e23

, .,  u, , euc u, u, uw { ` 
:e *3 0x uw euc u

0xFF // The number 255 in hexadecimal

,_ , be, ,w d],3 ",  e " d u ^ e}3


., be, ,w ,  ,e, ,"# e,}3 3 .{ {uew e u {x -
e,e,w u, u, " ^ e ^ # }b " u e|u _ euc
^, ,_ {, d", - _  be w " NaN d]3 "  be w
._ u} isNaN() wu| # "  # 2 # dw .{
w| Math e ._e | " d d du{wu Number e
Math.random() Math.pow() Math.sin() ,,u " e, } e, u"
.ue |

ew u

=?>

2u, false 3 true du,I3_ uw _  " ` " 3 ew *


, u, 3 , u w %u u 3"  u {" - u  .e 
.}   2u u {w ^ uw " 2 2}w _ dc [

u}"
u, 3 1u," -3, # d}," # "u,x {Y`, 3u, d}," ^

=??

B {Y` 3u 2uw#

.{ e}w =O =` du d # u
eu|3 u 0 { uw {Y` 3u " d}" u
:  " c *  " 2|e " 0 * .e
'testing'
"3.14"
'name="myform"'
"Wouldn't you prefer O'Reilly's book?"

d, du,  , ,3 \ d, d}," ", ^  " ub


:  2u # 03 " ]3 ux_|  . e | " dw
u
23"3 du
d

{ }" d 2uuX _ 0 u -3}X


{ }" d 2uuX _ eu|3 0
23"3 _ d
{ dd euc u uw = | d"b" " 2 " _ d
{ dddd euc u uw ` d"b" " 2 " _ d

v_|
\b
\f
\n
\r
\t
\'
\"
\\
\xdd
\udddd

"u,_ d,w ,|e, ,_ ,_e | d u# du%3" String $_


,| " length { $_   " ._ u} u # u}" d3"
.ue " }" " du | _ _e
}" 3 (==) d3u| c ._e 3 w " u}" (+) c
,) ., u, }, eu` d du}" d3u u4 u xw _e e"w "
-, ,w u, eu, $u w 3 Xe " u}" " d3" w u
1, ,c (.,uw }, "u} { ` 3u u 3 C++ C 2uuw \
3 > <= <) d,w" du,c ., e, 1u, " "u,_  ` (!=) d3u|
._e u eux v|| # u} uw " u}" (>=
u} 2|e ex|| Z w e Xu| {Y` 3u du }"
d,
4 , ,_e, , u,}" d3" _ eu%3" .  | " }" ^
. be w " }" # d}u |

Unicode.

{Y` 3u ex =

u

=?M

, .{, { d | d" _ { v_ d  * ^ e ^
,c # e ^ du{ w ewu} dw . " " ^ 3 1u ^ {
,# ", ,w " o e, ^, du{ u |e
4 . e u} .
:w 3 w
o.x = 1;
o.y = 2;
o.total = o.x + o.y;

,x # e, du,{, {Y`, 3u, " 3u, 3 C++ C -, w


{Y` 3u du . _ v} " e} 2|e et w  |
, , du,1u, u,w " , d  u, u, :}, eu,x|" du"
: _ 2uw 2|e " u uw " u du{ vx w ._e
o["x"] = 1;
o["y"] = 2;

23,w et, ,# ", ,w ,|e, .,e }u new c uw u


:#uw {
var o = new Object();

,_ eu, {u dw | X # du#u # 0 " w u


,| u, dw %3" 3 { d | x # 3 } u # e_
u, Date e, ^, ,|e, # d uw 
4 ._e u} {
:{ u 2u# - _ _
var now = new Date();

1u .#uw ]3 du#u 3 du du$_ 2u| |e \


.   2u 4w " "u_ 
} " } | uw " u |e 2 # w 3 => {Y` 3u "
,w ,_ {, ", 3 1u, u, # e}, u, }, | ._ u uw
" 3  ,e, , c` # 0b3 uw 3 e } name:value "
:0u 2 w .{ 3  
var o = {x:1, y:2, total:3};

._  w " (Date 3) Object { w

u"

=?N

u,, ,, d",,cu u,, du,, ,,w ,,_ {,, e,, e,, ,,"
# ," ^, d, d",b"u u w e} dw . " d"b"u

== {Y` 3u 2uw#

: e u} [] c

a[0] = 1;
a[1] = a[0] + a[0];

^, ," , .{, , {Y`, 3u, d," ^, , 3


, ., e, 2u, " ," " u | _ " length {
, " ,,u .{,, length - 1 ,, {Y`,  3u,, d, " ^,, ,,
1# 3 ,uw c du" 3 u # dc " * d3u |e
.uw * ^ # " ^ u 1u| u _ {
:_e u} Array() d#u # " ^ }u dw
var a = new Array();
// Empty array
var b = new Array(10);
// 10 elements
var c = new Array(1, 2, 3); // Elements 1, 2, 3

u, uw } " u4 } " u" |e w w => {Y` 3u #


d,w .,_e  # 0b3 uw 3_ 23" " " u {u  " ._
:0u
var a = [1, 2, 3];
var b = [1, true, [1, 2], {x:1, y:2}, "Hello"];

" ," ~,x ,w u,," u,w "u_ du%3" # d"u # * dw


._  {

u%3" 3 w|

=?O

 ,e | "uw ^ _ { {Y` 3u duw } # d wu|


:{ # " w wu| | . _ e uw " u w " 2 2|e 3
function sum(x, y) {
return x + y;
}

e,, ,,3 u,, # e}, 2  u,,w 3 () ,,c # u},, u,,w ,,w|


:e
var total = sum(1, 2);

// Total is now 3

wu,| Function() d#u # u} uw |e == {Y` 3u "


:_ u
var sum = new Function("x", "y", "return x+y;");

, 3 ,e, | } "} uw w| w w => {Y` 3u "


:{  Function() d#u
var sum = function(x, y) { return x+y; }

^, 2 ,w  ,e,  &u,} e ^ { w ewu| _ euc


et, ,w this dI3,_ %3" ^, d,w 23" " .be e 2 %3"

{Y` 3u ex =>

.{ 2 { wu| _ _e "u


u_ d d3u arguments[] d" wu| ^ dw  "
, {, " u3 3 w| ~x w .{  wu| w _ { eu3
._ 

undefined 3 null

=?@

_,., *, # 1`\ # _ " 3 " 3 {Y` 3u "


d, 2u, ,_ {, d]3 " {Y` 3u " null dI3_ .}
d#u, ", Z, _ e uw null d3u d} b .{ " 1
undefined dI3_ {Y` 3u " &u " c . " c * #
_ " e} _ eu# 3  " 3 %#u du} " "  .{
# d, } =N {Y` 3u " . e  b w Xe  " 3
| d]3 " d3u _ " 3 undefined 1u w d | X
" u,, == ,,c 3 ,," ewu,, ,,u undefined 3 null .{,, ,,
u}, === c # uw  u | u w w b . "uce d3u
._

uc 3 u"ux

=M

u,{wu { ` _) " u {Y` 3u " u"ux `| dw


# u}, u,w (,uw ,w| e, u, 3 ," ,u e du{ u}
3 e, "u,x [ w "ux ^ 2 _ | dw ._e v_| uw c
:0u [ . _ u} }X # 2|e "ux ewu#" 'X v|| 2  |
1+2
total/n
sum(o.x, a[3])++

,_ ,_ { _ | " uc # eu_ d {Y` 3u


" u,c { ."  w u 3u 3 C++ C 2uuw dw u
"u}, 3 "u}, duc d"uw " 4} w 3 {  # 03
W[ d 2u L  e 2u " c { _ e} " . _  ~w
.{ W[ w {" d 2u R 3 {" w

=? {Y` 3u 2uw#

w
e du{ w ewu}
" u w ewu}
wu| ^ e
e u
(d^ c) dw u ex 
(d^ c) dw u ex u_
(e) d^ du
(c 1) d^ d3 w
(d^) e}w }
(d^) e }
(d^) { ^ | -
(=> {Y` 3u)
(== {Y` 3u) (d^)  * 2 b w
(d^) | " 2 b w
(== {Y` 3u)
uuw | 
| 
u}" 1u 
W[ 0u}
{ w {" 0u}
w {" 0u}
d3u u |^[_ |^[_
d3u u |K"w |K"w
(=N {Y` 3u) e * e"3
(=N {Y` 3u) { 3 e"3
d3u| 2#
d3u| 1 2#
(=? {Y` 3u) eu` 2#
(=? {Y` 3u) eu` 1 2#
e}w AND
e}w XOR
e}w OR
e AND
e OR
( ?) e c
&u}
uw &u}
ub[ ewu#"

.
[]
()
new
++
-+
~
!
delete

L
L
L
R
R
R
R
R
R
R
R

typeof
void

R
R

% / *
- +
+
<<
>>
>>>
<= <
>= >
instanceof
in
==
!=
===
!==
&
^
|
&&
||
?:
=
3 -= += *=
,

L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
L
R
R
R
L

1|
=N

=M

=?
=>
==

A
@
O
N
M
?
>
=

," 3u,| 3u, 3 C++ C du, 2u,w# uw _ {Y` 3u duc


:} # " u

{Y` 3u ex =M

!== 3 === x
# ",, ,,w " d3u,,| == e, {Y`,  3u,, d3u,,| ,,c
d}," 3 3 
4 . e " * x| 2u` 3 _e |
3 null  , ,be, , ,,,ww " 0 3 false  , ,be, , ,,,ww " "3"
=== e, eu,` c ._e ' d3u " undefined
2u,` , 3 ,_ , be, ,w true eu,# , :{ |
v,|| , ,w .,uw ,ww 2u" 3 } eu` * e :uw
.{ != c # |_ !== {Y` 3u eu` 1 c

d}" duc x
d ,, du,,3 2 # ,, ,,w 3,, + ,,c {Y`,  3u,, "
" u,}," === 3 == duc ._e 1u  " d}" du3
eu,` du,, d3u u4 u xw _e u " $u w
v,|| $u, ,w " u,}," >= 3 > <= < du,c ., u }
._e u uw eux
typeof x

"number" u,, .,, be, ,,w },," ",, ,,w " ,, *,,
u,,,,,, 3 "function" "object" "boolean" "string"
",, ,,uw null ,, ,,b .,, be,, ,,w "undefined"
. be w "object"
instanceof x

wu,,| u,w W,,[ -, e, ,_ , be, ,,w true ", e|", "
.uw }u (RegExp u Date u) {" - d#u
in x

u,) ,3 {," -, e, _  be w true " e|" "


.uw {  W[ - " 2 1u _ e} ("3
delete x

_ { 2 0 u  _ _ { ._e JuX " e { ^


",  ,_ -, 2} " { b .w null " { w
. be w true " b3  be w false

=N {Y` 3u 2uw#

void x

. be w undefined " 3 _ - #

u"}

=N

{Y`, 3u, du,"}, # d, {Y`, 3u duw ^


}, 3u, 3 C++ C du,2u,w# ,u {Y`, 3u du "} _ .{
.e

e|"ux du"}

=N=

e,| "}, ^ 2 w eu| w |e {Y` 3u "ux


e|"u,x du,"}, u,_ 3  %3" e " &u} .
: dw .}
s = "hello world";
x = Math.sqrt(4);
x++;

v_ du"}

=N>

,w  ,  ", , 23" " u,"}, # d, ,_ euc


^ # while d ^ dw
4 . e e| v_ "} ^ 2
 1u "uw [ "} [ _ w b . e `| "}
u 3 for if dw u " w ^`|  ._ u} v_ "} #
. be " u} " {b  4w _ eu"}

eu du"}

=N?

d,w 2|e ub .{ 0b3 ^ # `} u4 eu "}


. _ u} eu "} # eu dw uw d }

" v[w du"}

=NM

2, ,w eu, 2,|e, "}, , ,w ,w ,w => {Y` 3u #


3 break du,,"},, " 2,,|e,, "u,,_ ,, u,,w .  &u,,} v,,[w
. _ u} uv[w  # continue
label : statement

{Y` 3u ex =O

u"} eux

=NN

,_! eu,x v,|| ,w {Y` 3u du"} 1u| # duw "


.e
break x

",,, " u,,, 3 ,,, ,,,|e,,,3" d,,, break "},,,


:_e } " w 1u d w w => {Y` 3u

break ;
break label ;

case x

2 # v,[w d,w dI3,_ `w { e3 "} ^ 


" switch "},,,,,,, ^,,,,,,, 23" " u,,,,,,,"},,,,,,,
:{ 2 # w u => {Y` 3u
case constant-expression :
statements
[ break ; ]

u,w ,_ u,"}, # e3b switch "} {u u w


} break "} w uw
4  case v[w
.w
continue x
=> {Y`, 3u, " u 3  |e3" continue "}

:_e #u "uw3 "  w 1u d 2 # w u

continue ;
continue label ;

default x

{, ex,[w ,`w { e3 "} ^ case u 


2 # ,w u, => {Y` 3u " switch "} 23" " _
: e u
default:
statements
[ break ; ]

do/while x

,,uw true "u,,x ^,, ",, , _ e, }3 u,,| do/while d,


d, ,u "}  ._e  "` " w " e"}

=@ {Y` 3u 2uw#

3) ,be, ", , 2u,uX " , (, ,` { while


, "uw ^ `} dw _ { u 2w  .( e #
: e
do

statement
while (expression) ;

M =W`,{, " ., u, => {Y`, 3u, " "}, 


._e "u_ {" do/while d " continue "}
for x

du,"ux 2 " _ { u} d ^ for "}


:e v_| ( "ux uw  3 %#u

for (initialize ; test ; update)


statement

,,uw },, true ",, test "u,,x , _ e, }3 u,,| for d,


^ " initialize "ux  ._e  " statement
"u,x ",`| "3 , 2u,uX " 3 ,_e  *3 # x "uw
.ue ewu#" " update
for/in x

:#e | e du{ d3" "ux 

for (variable in object)


statement

"u,w ^, " "}, e, ^, { dw for/in d


, ,| ,} ,w " { " "`| "uw # x . e 1u
d, ,| ,X # due, &, # e,w ., e &u}
du,{, e,3  ,e, u,  d3 w {Y` 3u
.e d"uw w"u_ | |
function x

:_e | {Y` 3u duw " " ewu| "} 

function funcname (args) {


statements
}

2 d,w ,_ _e | funcname 1u w ewu| . "}


args u,w 2 du,3 3 {, , ,s" du,"}, # `}
1

Netscape.

{Y` 3u ex =A

{, ,3 1u, [ u # `} e} args .{


u,3 , # 2,|e, wu| dw " .  # 0b3 uw _
. _ u}  e  wu| w _ eu}"uX w "u dw
if/else x

,,,uw true ,,,  "u,,,x ,,,_ e|",,, " if "},,,


:_e  " w "}

if (expression)
statement

false ", " "}, ,uw },


if (expression)
statement
else
statement2

3 else w b
:_e  " dc "} "ux 2 w

1u,  if/else "}, ^, u,w "u,w3 2|e " else w


: { w else if "} u|  _
if (expression)
statement
else if (expression2)
statement2
else
statement3

return x

{, , 0u, "


4 , ,_ ewu,| ,_ ,e ~uw "} 
e|"u,x 2 0u,x ,w ,b . b #uw d  w 3 }
wu,,| e},,b#uw ",, 2,, ,,w "u,,x 2 ",, ,,uw ,,}b ",,
: e  b w
return ;
return expression ;

switch x

"}, , .{, du[ u ^ switch "}


v,[w u,w ,_ e"}, ,w ,w 3 ,_e, ewu#" " e|"ux }w
,b . 3"e, {  { w " w x 3 case
u,w {,wu case u,w , , du,"} # 1`\ "
,w 3 " " switch "} uw } " "
: 3"e { default v[w uw _ e"}

=B {Y` 3u 2uw#


switch (expression) {
case constant-expression: statements
[ case constant-expression: statements ]
[ . . . ]
default: statements
}

u,w
4 , switch "}, , du"} #
^, # ,uw u,|  ,e, 1u,| return u break "} ^
. c " "3 "
throw x

,w " u}, ^, u, 3 {, u, d, 2u, throw "}


|^ w uw uw 0}_ _ e v   . ce
try/catch/finally "}, w) } u} d# X
3 , ,| ? ECMA $u, w throw "} .(_ 
,# ", ,w 2 "}, .{ d#u uX =N {Y` 3u "
:{
throw expression ;

ewu,#" *, , # d", w { ` expression "ux 


(._  { " u ~x w) .
try/catch/finally x
" uu}, %# X "u_ 3 #u try/catch/finally "}
,| ? ECMA " "},  . e `| " {Y` 3u

" w 2 "} .{ d#u uX =N {Y` 3u " 3


:{ #
try {
statements
}
catch (argument) {
statements
}
finally {
statements
}

,_ ,_e, , " }, # d, "}, , " try w


" eu, ,b .,b ", %# ,X ", ,uw 2 duu 3 uu}
 , }c w try d 23" # eu} u 3  X " uw
. ,e, ,} catch w " u} %# X du"} w 0}_

{Y` 3u ex >

,_ d", {, e, ,} ^ u 3 3 ^ u w 
u,|  ,e,  &u,} e }  w  e s" u} |
,w .,_ u}, 2 # ,}w catch ,w du"} 4w `
w u} ` # - _ { eu"} d3u finally
du,w .e  catch u try duw # w  u }c
-, 2|e " u d3 e3 d"u} finally u catch
. _
var x

d"u,} ", ,w 3 ,_ 1, " ,} ,[ u ^ var "}


" e,3 {, d"u,} u,w , }, " ,} 1 ._e %#u
. _ 1 " e du} uw w| dw 
var name [ = value ] [ , name2 [ = value2 ]

. . .

] ;

while x

,_ eu,# u,| , , .{, eu d ^ while "}


:_e  " 23" "} uw true  "ux
while (expression)
statement ;

with x

,_ d", w _e u 3 d# w " et "} 


: e  e 2 d# " "} ^
with (object)
statement ;

,! ,w eu, ,w ,_ " d,\X exu  with "}


. u} }_ 2 # _ _e | u4 _e " ux|

be {Y` 3u

=O

du,1u, u,w " d u, ,_ }, eu,x|" du," {Y` 3u du


|e 3 " d u eu} "u_ 3 #u {Y` 3u . e (ux|" u{
| dw ._ | u # d du$_ duuw " u} dw
d,c wu,| , , #u, .w #u wu| ^ uw }w  $_ ^
3 , e, %#u, d,w 3  ,e,   new c uw ` {

>= {Y` 3u 2uw#

{, d#u, u, " 


4 , .,_e, u}, this dI3,_ # 2 w "u
: #ue Point 1u w d $_ # eu _ we
function Point(x, y) { // Constructor for Point
this.x = x; // Initialize X coordinate
this.y = y; // Initialize Y coordinate
}

 ,be, ", u}, ", #u, 2, ,w ,_ {Y` 3u wu|


,w ,_ " "u, e,u e, ,w {,  . " prototype 1u w e}
,b , . ,be, ", u} " #u | u {u dw 2
}u, #u, u,w ,_ eu 1u| dw _ | e  d3" e}
$} " u%3" 2  " dw
4 e # ."e " w e
2u,` toString %3" 2 _ | . e u} $_ ^ du 1u|
:0u dw .uw } " }" w x| {wu $_ du _ e
// Define function literals and assign them
// to properties of the prototype object.
Point.prototype.distanceTo = function(that) {
var dx = this.x - that.x;
var dy = this.y - that.y;
return Math.sqrt(dx*dx + dy*dy);
}
Point.prototype.toString = function () {
return '(' + this.x + ', ' + this.y + ')';
}

,|e, _ | (e_) u} du{ u u%3" e b


:0u dw . e w 3 &u} #u wu| w u4 } " u
// Define a commonly used Point constant
Point.ORIGIN = new Point(0, 0);

, ,| u, Point $,_ ^,  _ u _ e} u "


:_ u} # } u e} " 2 # |e _

// Call constructor to create a new Point object


var p = new Point(3, 4);
// Invoke a method of the object, using a static
// property as the argument.
var d = p.distanceTo(Point.ORIGIN);
// Adding the object to a string implicitly
// invokes toString().
var msg = "Distance to " + p + " is " + d;

v| du"ux
3 " v,| du,"u,x # u}, {wu c wu| dw {Y` 3u

=@

{Y` 3u ex >>

# eux},X {,wu => {Y` 3u .{ =0X euw 2uw# u 2 "}
,_ d},w u, =N {Y`, 3u, " 3  " M 0,X v,| du,"ux
"u,x ^, .{, , u, 2 ,w {, N 0X " v| du"ux w (w
,,_ du  " u # d " w {Y` 3u " v|
u, du 2 0ux w { ` d"u} " w _  e (/)
m 3 (K",w 3 ^[_ -3 w $u d}) i (d d}) g
3 .uw }b " ({ =N {Y` 3u uu #  d[ {u)
du, RegExp() d#u, # u}, u,w 2,|e, e, ,| "}  w
du,3 ", ,w " u, 3 ,c du,, #u  .{u RegExp
. be _ d 23w d}"
{, u,}_ , d, # "u v| du"ux "} u_ |
._e 2uw " "} # d # du{ " du03 e3

e du

=@=

:}, e, v,| "u,x ^ " c du _ 3   -3


du,{, " ,_ d", ,w 0u  uw .e  x| 2u uw u4 u
*3 \ uw _) b du 3 d"b du # d |   #
du,%3" ,b du,, , ,| u ." eu eu _ } (e
:_e  e du u dw dc
u
e x 3   du e u uw
_ e 2 # u 3 e x d"b d e " uw
uw } b u ]3 du
nn euc u " uw
nnnn euc u " uw ` d

\t \r \n
\? \+ \* \/ \\
3

du$_

\xnn
\uxxxx

=@>

u, du 2  2u dw 3_ # v| du"ux "} "


,b du,  w 3 . e u} c ^ " du$_ u 3
2u, ,# 03, " ,_ ,_e | " u d du$_ # d"uX
: 
1

Perl.

>? {Y` 3u 2uw#

u
e x 3_  " d uw
e x 3_  " d uw
e x # uw
e x _ /_ d uw
e x du / du d uw
e x " /" uw

"`|

[...]
[^...]
.
\W \w
\S \s
\D \d

=@?

"u,w ,[ .ux ^ ` | dw " v| du"ux "} # 03


. e 2u  "`| |e
u
e x "uw ^ u d"u} d
e x ex d uw "uw [ u ^
e x ex d uw "uw [ u
e x ex d uw "uw n u4
e x ex d uw }w u "uw n
e x ex d uw "uw m _ e3 "uw n 

?
+
*
{n}
{n, }
{n, m}

^, 2,|e, ",`| du, # 1_ 0ux w =N {Y` 3u "


,x ,` ",`| ,}_ u,w e  }_ 2u u|  " 0p {
.uw " {" }w c _ d u|

ecu 3 dw3b

=@M

,,u {,," e, du,,"u,,x d,,w3,,b d,,w v,,| du,,"u,,x "


d, ^, ,` d,w ,}X 
4 , . ,e u} }X # eu" du"ux
,w u, # 2,|e, , " .{, ,  0u "ux# ^ 1u| w "`|
. 3"e, "u,_ w 2 w cuwu 2  2u dw _ _ u} | d 
{u c wu| _ euc :" eu "u}" }X  " }b " du3b
$u, ,w 2,|e, 3  ,e, ,! {, ,x 3,b , uw _ e}  e
:{  2u # 03 " "u_  "} . _ "u 2 w 3b d"u

{Y` 3u ex >M

e x b u a uw
Y u w 2 uw x } 3  e dw3b 3 d ^ w sub "ux#
e
d"b"u 2 uw x } e3  e dw3b 3 d ^ w sub "ux#
(=N {Y` 3u) e Y u w u
e x  w x n d"u 3b uw _ eu 2u uw u4
_e cu  w x n d"u "ux# uw _ " e} ecu du}" "

a|b
(sub)
(?:sub)

.ux { |

\n
$n

=@N

(2 , u, 03
4 ,) }," 23" " e} uw v| "ux " c ^
2 # 2,|e, . ,b x 2 du # 1`\ uw ` 23w  e x
. _ u} }" # eu { w .ux } c u 2 _ 3 dw
u
 u 03 " d [ {u " " u 3 }"  u 03 " .ux
_ 2_ " u _ 2_ " .ux
.ux " u 2ub 23w  dc uw dw du .ux :uwX e"w
(=N {Y` 3u)
(=N {Y` 3u)  dc uw dw du .ux 1 :e duwX e"w

{Y` 3u du{3"

$ ^
\B \b
(?=p)
(?!p)

=A

{u,3` { _ | " {Y` 3u # {3" [ W`{


u,, 3 {,, , _ ,, "JScript" 1u,, ,,w du,,} wu,,_ du,,{, 3" ,,
2,, {,,| "u},, {Y`,, 3u,, # {,,3" ,, ECMA d#u,, "u}
e"w " } du{3"  # duw " .{ _ "ECMAScript"
d3u, , {, " ," ._e e"w c` uw " u (ux|" 3 _
.{ s" u{3" # ^_ " eb]3 2 e 2u _ { e|u
= {Y` 3u x
#3, 3 w 0u` # X {3"  .{Y` 3u 2uw# d3 {3"
. d#u uX > W`{ " "_ {3" .{  u4 x|
== {Y` 3u x
" . ,w , , , du,u  ,_ ,s" " e,3 d" e

>N {Y` 3u 2uw#

. d#u uX ? W`{
=> {Y` 3u x
c dueb]3 # d"u 3 v| du"ux switch "}
e,,w e,,3 {,, "ub#u,, = ECMA u,,w u4 ,,x| .,, u,, 2 ,,w
. d#u uX M W`{ " . "e [ w 2 " uecuu
=? {Y` 3u x
= ECMA u,,w .{,, ,, ,, => {Y`,  3u,, du,,ecu,,u
. d#u uX MN W`{ " .{ "ub#u
=M {Y` 3u x
. d#u uX W`{ "3  "
=N {Y` 3u x
3 #, " .{, "ub#u ? ECMA uw . u 2 w u} %# X
. d#u uX O W`{
=

= {Y`e x
{,} d,3 du,, " .{, = {Y`, 3u, 0 u, u4 x|
. d#u uX ? >""Y_
> {Y`e x
{,,} d,,w du,,,, " .{,, == {Y`,  3u,, 0 u,, 4u, x|
. d#u uX ? ""Y_
? {Y`e x
" .{, "ub#u, = ECMA u,w .{, =? {Y`, 3u, 0 u u4 x|
. d#u uX M ""Y_ {}
M {Y`e x
. d#u uX d`x b"3 Z "
N {Y`e x
" .{, "ub#u, ? ECMA u,w ex " w  " u} %# X {wu
1
2

Mozilla.
Internet Explorer.

{Y` 3u ex >O

. d#u uX N ""Y_ {}


NN {Y`e x
4 u_ .{ =N {Y` 3u 0 u u4 x|
.{, "ub#u, ? ECMA uw
.{ d#u uX O 3 NN ""Y_ {} "
= ECMA x
e, u du,,e, b]3 .{Y`,  3u,, 2u,,w# "u},, , 3 , 3
, , e,b]3 ,[ 3 ,_ d#u, "u} " == {Y`, 3u
" v,| du,"u,x # eux},X 3 switch "}, . ,_ u
3 =? {Y`, 3u 2 uw "ub#u dud#u uX . ` d#u "u}
.} ? {Y`e
> ECMA x
3 ,_ ,w uuw | w _ "u} d"c d
. ` e d eb]3 Z
? ECMA x
uu}, %# X 3 v| du"ux # eux}X switch "}
=N {Y`, 3u 2 uw "ub#u du d#u uX . _ d#u "u} "
.} NN {Y`e 3

>@ d} { {Y` 3u

d} { {Y` 3u

>

" ,_ {, e}Y`, 3u, }, d}, {, {Y`, 3u # "


. ,e,  `x b"3 d3 w 3 e  du HTML d 23"
d}, {, {Y`, 3u }  }b x { " _ } du w 3
" ,  2u, , ,b"3 -, ,_ " e,} , c e [ w
e,}x
4 d} { {Y` 3u duuw .} d} 3 b"3
3 ,b"3 uw w"u_ u| w uX " _ {  2 du _ } 3" w
{Y`, 3u, du, {Y`, ., e  {Y` 3u du# X 3" 
" " d, e,} du,," ,|e, ,_ {, ,|" ", d} {
du,{Y` 0u
4 `x dub"3 { w ._ u `x b"3
},, 2  ",, ec,,c[ ,,}w {,, , " .,,_e, 3,, " d},, {,
du, d,s" ,w u,,c ,_e, 2u,w " HTML du,,,3X " {Y`, 3u,
3 {Y`,  3u,, du# X , 3" 3 u , 3" d},, {,, {Y`,  3u,,
.# Xe {Y` 3u e} du{ 3

HTML "

{Y` 3u

>=

" eu, 3 # X 3" {Y` " w 2|e " {Y` 3u }
. e  " u
4 ! _   " HTML du3X

<script> dbw

>==

du,,,,bw 23" " HTML du,,,,3X " {Y`,, 3u,, },, 4,,_
: dw . e 3 </script> 3 <script>

<script>
document.write("The time is: " + new Date());
</script>

d,,bw src {,, # ,,|e,, 2 # ,,w 3 == {Y`,, 3u,, "


., _ u},, e"u,, {Y`,, ^,, eu,, 2 , _ ,, d,,w <script>
} du3X
4 . e 3  "_ eu " {Y`

{Y` 3u ex >A

 # u} " " _ _ { .e .js X uw {Y` 3u


:{ #u " </script> dbw {
<script src="library.js"></script>

{, , {Y` 3u # euw# w " u{Y` 2|e HTML "


,,u d,,c du,,2u,,w# # ""Y, _ {,,} ,,u u,,b"3 # e, w
4 ,, 3
=
# {Y`, ^, 2u,w# ,| d,w 2,|e, ._e eux}X {Y`ewd3
u,b"3 1u,| " {, , ',,X ", . _ u} language {
, ,w 3, .{, 2 }, ,w d#u,
4 , , { "JavaScript"
d,w "JavaScript1.5" 3 "JavaScript1.3" ,u d u # 2|e
, , {,3" # ,_ eub"3 . _ u} {Y` 3u {3" |
. _  eY[ eb u w {Y` # _e eux}X
<script> d,bw d,w language {, M HTML " { "
{Y`, " ,}" "u,_ ,w 2u,w# ,| d,w e," %3" ' " . " 3
*, " {, , ", {Y`, 3u, d,w .{, type {, # u}
. " "text/javascript" MIME
<script src="functions.js"
language="JavaScript1.5"
type="text/javascript"></script>

u# X 3"

>=>

dbw # X 3" { ^ " 2 w 2|e " {Y` 3u }


. ,e, *3, "on" u,w , # X 3" du{ 1u . w "u_ w HTML
" 
4 , . ,e  # X 3" w (w } _e #3w w 3" e}3
onclick {,, d,,w 3  ,,e,, u,, ,,_ ^,, ,,# HTML },,
eu,X _e ^_ _ d3" w"u_ _ eu# _ e | d# X 3"
: e u 1uX dX " "
<input type="button" value="Press Me"
onclick="alert('Hello World!');">

.  s" 4w # X 3" du{ u {

{Y` 3u dueu

>=?

, d,w ,_  ,_ _! 2|e eu " w " {Y` 3u }


ueu c d} . e u} javascript: !u_ `|3X # "
1

VBScript.

>B d} { {Y` 3u

,b . ,e, ,| }," ,w ,u ", ,x| 3 {Y` 3u } ewu#" uw


, " {Y`, 3u } _ _ u} {Y` 3u eu ^ # e
void ,c #  , e, , cu, u,| , c ,w d" Z e3 _
:_ u}
<form action="javascript:void validate()">

X e

>>

{Y`, 3u, " .{ `x b"3 dX ^ - Window e


du,%3" 3 u,{, d,_ ,| d, e, X e d} {
3 d, du{ Window du%3" 3 u{  w uw .{ uw
.,_ "u, u, ,w e 1u 2 _ X 23w |e 3 } d w|
e, , ,w "u,w3 ,_ {, window {, X e du{ # e`
:_e "u X
window
window.document
document

// The global Window object


// The document property of the window
// Or omit the object prefix

" ,w ~,x ,w ,X e, du,%3" 3 u{ u_ { dw


u,%3" 3 u{  | " # du{ " ._  {
d}, { euw " X e # u} e 2 3 _e e"w "
{, document ,X e, {, | _ _ { . e 2u "
dX " _ { d d_ | _ " "u Document e w _
.  e"w dub ~x " 4w e . e  u b"3

u dc}b duX

>>=

. " 3 " d} w u dc}b duX u dw


, u, d}, d,w " eu,X _ e 2u` u w alert()
3 ,,Yw d u,, ,,/e,,w 0p,, ,,_ ,, e,, 2u,,` u,, ,,w confirm()
d^ d}" ^ _ w d} # _ e 2u` u w prompt()
:0u ._ "3 "
alert("Welcome to my home page!");
if (confirm("Do you want to play?")) {
var n = prompt("Enter your name");
}

{Y` 3u ex ?

{3

>>>

,_ }, ,X u,X " {3 ^ d" `x dub"3 _


{, # u}, u,w . 3"e, "u,_ ,w ,c u 3 uX u dw
e,} .  u {3  " e} _ _ d"u_ |e status
u, u, _ eu# u|  e u {3 du " w {  w _
# u}, u,w |e \ ._ ex " cu " d " b"3
_ eu# b"3 _ _ " eX } defaultStatus {

4 , .w u " 2  " {3 " 2  u dw dc u
" ,, {Y`,, 3u,, },, ,,_ ,,we,, " d,,X ,,# HTML },, "
{,3 , " dc } X eu du w _ e vx 2 # X 3"
:  u
<a href="help.html"
onmouseover="window.status='Help'; return true;">Help</a>

u2u#

>>?

^, #3,w 2u,# " ,uw }, , d,w d} { {Y` 3u "


},b # ,X e,} w _ e|" " . e u} # X 3" # 3"
dw ._ u} 2u# # |e   ue v w e 2u#
, {Y`, 3u, d}," ^, , 2u#  ^ 2 dY # X `
, " 2u# 3 w d}" 3 _ u} setTimeout() %3" # 
 , , "` " w }  _ w b .w 2 w }"uX 2 w "
" eu# du 3 w d}" 3 _ u} setInterval() %3" #
2 |e _  be w d" wu| 3 .w 2 w }"uX 2 w "
u,| ,w clearInterval() u, clearTimeout() %3" ,w v,|| w "
:0u dw . } dw d
var count = 0;
// Update status line every second
var timer = setInterval("status=++count", 1000);
// But stop updating after 5 seconds;
setTimeout("clearInterval(timer)", 5000);

} u

>>M

3 ,b"3 du, ,w X e # screen 3 navigator du{


d3u, ,_ ,_e, | " eu{ _ _e "u u d

?= d} { {Y` 3u

, 2 d3" _ eu } `x b"3 {3" 3 1u x # } u


3 ,b"3 ,w (,w ~,ux ,w .}, w"u,_ u, d 3 3  e
u}, eu,# u4 , ,b"3 e ._   { " u d
d,w u, 3 &u d`x b"3 ^ dw u4 u} " e} e _ e
:w `x b"3 # eu {3"
if (navigator.appName == "Netscape" &&
parseInt(navigator.appVersion) == 4) {
// Code for Netscape 4 goes here.
}

b"3 dw3u

>>N

_ eu) b"3 eu " d} w X e # location {


2,|e, {, , " 2 uw ._e "u (_e Wu| 2 " " eu
u,w , # ,|, .{,u {,  ,e  u u 0u " _ deu w
,b"3 ,_ ,_ d"u,_ 2,|e, location {, w " &u}
:w u " 2 3 w "  eu
// In old browsers, load a different page
if (parseInt(navigator.appVersion) <= 4)
location = "staticpage.html";

location {, ,w ,_ d# X ,3" u, {Y`, _ _ {


2 2  uw _  ~uw w d eu  dX w (w
! }  3 3w w # % 
| u X 2|e }" ^ u " location { " [b
e, , ._e "u Location * # et w 3 " {  e3  _
" ,u eu, ,} du,{, _ e 2u` u w _ " eu{
:w u w
// Get the substring of the URL following ?
var query = location.search.substring(1);
// Scroll to a named portion of the document
location.hash = "#top";

,u eu "uw3 b"3 _ e ~uw reload() %3" 3 w


._ "uw "
"u, ,b"3 d,X " wu e w X e # history {
du,eu, ,w " ,_ , e, 2u,` u w _ " eu%3" e  ._e
3 Back du,,_ uw w"u_ _ "u {" 3w v u 2 d "3
: e 1u " "u_  Forward
history.back();

// Go back once

{Y` 3u ex ?>


history.forward(); // Go forward
history.go(-3);
// Go back three times

X 0}_

>>O

,X 2, " " 3 # | 2  {_ dw eu%3" X e


"u, u, 3 X ^ w _ 2u_ 2 _ } dw eu%3" 3  "
:0u dw . " X 2 # 2 _
// Automatically scroll 10 pixels a second
setInterval("scrollBy(0, 1)", 100);

moveBy() moveTo() du,,%3" &,, " }, w u,, d,,w


scrollBy() scrollTo() resizeBy() resizeTo()
._   { " X e ~x w blur() 3 focus()
%3" 3 ,_e, , , du,X d3" _ u%3"  # |
%3" 3 ,_e, u, d, b"3 dX _ open() %3" :} c
, open() %3" . ,we " {Y` uw u dX ^ _ close()
1u, 13 ,3 .{, ,X " ,  u, eu, 03 ,3 . ,be, 3
,X 2u, uw } 3 1u 2 uw ex dX ^ b .{ X d"u}
1, ,3 . ,e, u, d, d,X 3  be " u} " "uw3
,_ " eu,eb]3 u u 3 dX d# _ { d"u} d}"
:0u dw ._e | w u uw
// Open a new window
w = open("new.html", "newwin", // URL and name
"width=400, height=300, " + // size
"location, menubar, " +
// chrome
"resizable, scrollbars, status, toolbar");
// And close that new window
w.close();

,_ ,, e, #u,, u,{Y`,, ,,w ,, u,b"3 ,,_ ,_ ,_ {,


du,X  " u w \ .xw  _ #uw 2u _ " euX
2 ,_ #uw d#u u{Y` w
4  ub"3 # ew  "# eb e
. e dX Z

} du" u_ 3 uX

>>@

,X e, ,w ,} open() %3" # u} uw }b


4 x _ d" w
d,X e, ^, -, 1,_ _ {u d b"3 duX 2|e
2 dw d e  e  2 " {Y` ^ _ dX .}

?? d} { {Y` 3u

,_ d", ,w e, 2 du,%3" 3 u,{ 1u| # |e 3 { {Y`


_ e}Y` _ eu# ` ._ u}  | d " w eb
,_ {, 1# {, d,c d,X u,w u| #u  e  X ^ "
: b _! { w Window e
// Create a new window and manipulate it
var w = open("newdoc.html");
w.alert("Hello new window");
w.setInterval("scrollBy(0, 1)", 50);

# d"u,,w .,,uw },, ,,} du,," u_ ,,|e, ,,X ^,, HTML "
u, u4 }x, u, # u}, 0u  uw e3 _e d"3 u" u_ # `x 2u
3 _e "u}" ub dX e ^ 2 w " u_ uw {Y` 3u .{
{, .,e, , , # }, ,} du," u_ " , du{Y`
^, du," u_# - _ { X du # d" X e # frames
:} X
// Scripts in framesets refer to frames like this:
frames[0].location = "frame1.html";
frames[1].location = "frame2.html";
// With deeply nested frames, you can use:
frames[1].frames[2].location = "frame2.3.html";
// Code in a frame refers to the top-level window:
top.status = "Hello from the frame";

,3 2 " ,X ,_ dX u " u_ w X e # parent {


d," ,_ ,b"3 du,w , d,X ,w top { . " "u {
, uw dX ^ X e b) ._e "u { u" u_ d
"u, ,X e, , ,w u4 , top 3 parent du,{, uw " u_ ^
(._e
 " {Y`, 3u d dw e|3u} d b"3 " u_ 3 X
1 } _ { u 2w  .{ d e X e  " 3
,w .,e, w dX e du{ w x| | { u
, ,| ,w| 3 u} # |e " u_ u X ^ " e}Y` v|| 
<head> { " " w| _ { u 
4 ._ u} c " u_ u X "
" , du# X ,3" 3 u,{Y` w 3 _e | uw dX
:_e X { w| 2 w top { # u} uw e3" du" u_
// Code in a frame calls code in the top-level window.
top.stop_scrolling();

{Y` 3u ex ?M

e

>?

"u, * # et w _ " document { ^ X e


eu, " :{, ,X e, # | 2|e e|u w " e ._e
2 " _ { dHTML d - { b"3 dX - X _
"u, eu, ,w ,_ " e,} du{ e . e  u X
,w ewu}, dw .ue  " u} | 3 ewu} 2u` _ _e
^, 3  e u} DOM u  e 0 1u w e3" # u}
:" 3 DOM * [
e DOM x
2u,,w# e,,}w du,,{,,3" #,, ,,w ,, e,, 0,, d,,3 *,,
u,b"3 d, {,u ", *, , .{,u | {Y` 3u
x # " d_ du{ ew w ewu} 2u` u| e3 {
._e  3u| 3 1 u u1
W3C DOM x

, " , d,} 1u,| ,| 3 ewu}, 2u,` e 0 


d#u, "u} (W3C) =eu d`x 1_ d3 w 3 _e
|u,w 3 O W`,{, d3 w ex " w  *  .{
. ,e eux}X 2" dub"3 u 3 |uw 3 N ""Y_ {}
# d"u,w e,3 {, "ub#u IE4 DOM uw " w W3C DOM
u,}_ , .{ _ d#u "u} " 3 DOM e dueb]3
u, d,# 3 , e, X " "u} d} dueb]3
du, u,w ,_ {Y` 3u 2uuw dw _ " DOM # d
du,u,}_ w u_ u| dw .ue s" _e "u_ HTML
._  {Y` 3u d"uw " |u
IE4 DOM x

dueb]3 uw " e DOM {u3` ""Y_ {} M 3


.  %},b ^ d} 1u| | 2u` 3 ewu} dw d
" u,, # e,,w e, 3 ,, d#u,, "u} ,,b u,,e, b]3 , 
1

World Wide Web Consortium.

?N d} { {Y` 3u

.e eux}X {u3` dub"3


e,"w },w ,,| u,,w " u,,DOM , # 1,_ ,, ,# du,,{,, "
2  | 3 ewu} dw u # |e c[ _   | 3 _e
._ u} d}

e DOM

>M

, e, du,{ # d} { {Y` 3u d3 DOM


d ,} e- du{ ._e  " u} w ewu} 2u`
2, ,w , d"uw " " e|u lastModified 3 URL title x #
du,{, , d"u,w " },w u dw . e " u "u} " _ ^
u,,{,, u,, .,u ,, ,, {,, " ,,w ~,,ux ,,w ,, e,
:_e "u d} &u * w _ } eu"
forms[] x

.{ " du1 - _ 1 du # d"


images[] x

.{ " du| - _ | du # d"


applets[] x

" .{, , " , d3u, du^uw - _ u # d"


, 0,}_ 3 3u, e{Y` dw 2|e {Y` 3u # 3
, , # ,| "u,_ , 1u, ecc[ e3  _ u} u^uw
.{ u}_
links[] x

.{ " duX - _ X du # d"


anchors[] x

,w ,c) { " duc - _ c du # d"


{, # u}, u,w ,_ be 23" d d"cu du2u`
.( e u HTML <a> dbw # name
, ,w u,w .}, , " #3,w v|| w w du d3u u" 
,,| ,, 3 {,, document.forms[0] ,, ^,, " 1,, ,,3

{Y` 3u ex ?O

du,^,uw 3 3u,| u,1 "u dw c " .document.images[2]


:{ HTML name { # u} uw u w 1u 2  
<form name="address">...</form>

 ,e,  eu, ^,uw u | 1 ^ w  w _ euc


,w " 2 u4 }, ,` u, 3 ,_ ,X ," " " 2 1u 2 # u} uw 2|e
: " u} " # e} "
document.forms["address"]
document.address

// A named form
// The same thing

" elements[] d," ^, e  .{ vu u4 1 e


d,w ., e, 2u 1 " " v|| w " 1 u _ { eu d3u _
3 Select Input ~,,,ux ,,,w 1,,, ,,,u , , ",,, " }, ,w u, ,s
.u  { " Textarea
forms[] d," ,u d u,# , u,| 1 ^ elements[] d"
e3 { 1 " " v|| w 1 u d3u "  _e ^
d,`[ . " "u " 1u w " u _ e u w " 2 2u` 
:cw " " # HTML
<form name='address'><input name='street'></form>

:_ u} |e " [ # 1  " } 3"3 w "u dw

document.forms[0].elements[0]
document.address.elements['street']
document.address.street

1 u u1 # d} w "u dw e" Z e DOM


", 3 d" Z 
4 ._e  uc 3 uX u^uw 3u|
, e, } 2|e e Z w u 3 uw <h1> dubw 1u| d3u _
3 W3C du,DOM "   4w _ d" w _ { e  .{b "
du{ " _ d" w 0u  uw .{ } X 2 w M ""Y_ {}
 " 2 2u`  " _ eu{ 3 3 uw e DOM   #
. | uX " w " d} u{Y` _ _e

uX " w u du

>M=

du,X | dw %3" [ e }cX du{ w 3


" , " " e,} ,|e, write() %3" # u}, uw . " d}
:0u dw .w %3" e d3u <script> dbw
document.write("<p>Today is: " + new Date());
document.write("<p>Document updated: " +
document.lastModified);

?@ d} { {Y` 3u

1,_ , d3u |e  e } v||  w _ e} _ _ {


, }, }, {Y` 2 _  # w b"3 uw HTML dubw #
. e u 3 _ | " 2 |
#, , _ eu# " u| <script> dbw " write() %3" #
, " 2 # ,_ _ e b . _ u} 2|e { 2  0u "
Ju,X ~,uw  ,e 0u u_ 2 "uw # w _ _ u} d# X 3"
" # X ,3" ^, # ,|e 0u  uw . e # X 3" 3 2
^, " document.write() e, 2 ,_ 0u, d,w " u_ u X ^
" , ^ u_ u} uw "u_  dw u ._ u} c dX
document.close() %3" , 1u,| 2u,|"u_ e}3 _ uw 2u| u 3 w
:_ e "
var clock = open("", "", "width=400, height=30");
var d = clock.document; // Save typing below
setInterval("d.write(new Date());d.close();",
1000);

uX du1

>M>

d3u, 1, e, ^, # elements[] d," ,, ,_ d" w


_ " eu{ u  # d"uw .{ 1 " u uw u} eu
u}, 1, , "  u " } u 2 dw 2 # |e
{, ,# }, 
4 , .{, u} duX | dw dc "  ._
" e, e, 2u,# ,_ ,_e, | db w " Text e ^ " value
: u
<form><input size=10></form> // An HTML form
<script> /* Display a clock in the form */
// The Text element we're working with.
var e = document.forms[0].elements[0];
// Code to display the time in that element
var s="e.value=(new Date()).toLocaleTimeString();"
setInterval(s, 1000); // Run it every second
</script>

1 e"ux}

>M?

w"u,_ ,_ eu,# ,_ " onsubmit # X 3" ^ <form> dbw


d,w # X ,3" , # ,|e . e 0u  | " e _e e
,X 1, " 1# du, 1u,| ,` e,"w
4 , e, :,_ u}, e"ux}
 ,| 1, , b ,w false " onsubmit # X 3" b .

{Y` 3u ex ?A

<form name="address" onsubmit="checkAddress()">


<!-- form elements go here -->
</form>
<script>
// A simple form validation function
function checkAddress() {
var f = document.address; // The form to check
// Loop through all elements
for(var i = 0; i < f.elements.length; i++) {
// Ignore all but text input elements
if (f.elements[i].type != "text") continue;
// Get the user's entry
var text = f.elements[i].value;
// If it is not filled in, alert the user
if (text == null || text.length == 0) {
alert("Please fill in all form fields.");
return false;
}
}
}
</script>

:0u dw . e

3u| d#3"

>MM

, e, " u d]3 du # e` u 2u` u w e DOM


u4 , , , # .{, ,c ,| uw | ^ duX ecu eu| 2 3
| d3" " cu e}3 ` e  e u} 3u| d#3" dw
eu d3u e # images[] d" . e ' |  be "
{, ^ | .} " 3u| - _ { | * #
d,w .,_e, ,  ,  u, uw _ " d| eu _ " src
:w eu ^ {  w _ { eu_   u | |
document.images[0].src = "newbanner.gif";

,uw ,_ u} 3u| d#3" d { ^`|  # ` dw


.,_ u} onmouseout 3 onmouseover du# X 3"  w 2 #
"u, 2 # 3 ,e, ,| "3 " _ eu# v|| w u# X 3" 
, ,w " e`[,_ {Y`, 3u, }, ,# 0u, " . ,e, 0u  e
:_e u " | d#3" d _ we u# X 3"
<img name="button" src="b1.gif"
onmouseover="document.button.src='b2.gif';"
onmouseout="document.button.src='b1.gif';">

,}w  ,  u, u,X ", ,w d,| _ { " _ euc


do,| 2, u, , u,| ,_ "uw b"3 2u du w " 2
4 x _ {

?B d} { {Y` 3u

u}, , # "u, du,X | ^ # |e "  dw .u X


:_
var i = new Image(); // Create Image object
i.src="b2.gif";
// Load, but don't display image

ue__ uw "u_

>MN

,|e, 2 u,,w ,_ {,, d], 3 {,, ,, e, cookie {,,


uw "b e__ ^ 2 _  dw .w 3 w " w (w due__
: &u} # " w d}" e__ { w _ { eu_ 
name=value

}u, , , d,w , , ", 3 1u uw e__ ^ "u_  uw


# w"u,_ 2, "u, # ,w e,} ,_ ,_ u, de__ w b . e
" 2 du "u| # " w d}" # u} uw uw  ! b"3
:u
name=value; expires=date

%3" d, ,3 ,,,w , ,_ ,,,uw e|",,, 2u,,, ,,,w , ,uw u,,, "u,,,|


d,w e_,_ ,_ ,w ,b . ,e,  _ w Date.toGMTString()
, , " 2 uw uw ewu} wu u e}} ucuX c du
:u
name=value; expires=date; path=prefix

2, d,w .uw  e__ ^ # w uw { ` 3 ^


d3u, }"  .w " cookie { " _ { eu_  due__
# u ^ 3 0b3 ^ uw _ { name=value " w du}"
expires= u path= du{ w uc\ ue__ 2 1uc . 
u, " .{, , _! ue__ " 3 1u u4 }"  " _e "w
,X cookie {, " " , 1u, uw e__ ^ " _ we " ewu|
{,u ,0,b3 d b ue__ u " _ {  w ' ._e
. e
function getCookie(name) {
// Split cookies into an array
var cookies = document.cookie.split('; ');
for(var i = 0; i < cookies.length; i++) {
var c = cookies[i];
// One cookie
var pos = c.indexOf('=');
// Find = sign
var n = c.substring(0, pos); // Get name
if (n == name)
// If it matches
return c.substring(pos+1); // Return value
}
return null; // Can't find the named cookie

{Y` 3u ex M
}

W3C DOM

>N

`, ,,_e, "u},, " e,, DOM du,,e, b]3 DOM *,, , 


du,,," ,w 3, *,, , .,ue, u, , " d, , du,e,b]3
,| , " eu%3"  e du{ u 3 images[] forms[]
,u , 3  u # 1_ _ e #u u{Y` w _ _e
. | u 3 w " 3u| 3 u1 u eu

u $u w u }u

>N=

u,w " 2 # e,u ,u ,e, ,_ _e u d _ euc


(u) id { ^ &u w |e  | {Y` # u}
$u, ,w , ,w }u, {, d,w ,|e, w .w w " uw
:_ u} e w } getElementById() %3" # 2 du
<h1 id="title">Title</h1>
<script>
var t = document.getElementById("title");
</script>

bw 1u $u w u }u

>N>

%3" .{,, ,,bw 1u,, # u},, ,, ,,u ,,w ewu},, d,,w ,,c "
, u 1u| # d"  e w } getElementsByTagName()
w uw 3 { " " %3" 2u u # 1_ . be w " 1u 2 uw
, d,# e,c ,_ " , ", dbw uw du
4 |e 
:_ X " } e
// Get an array of all <ul> tags
var lists = document.getElementsByTagName("ul");
// Find the 3rd <li> tag in the second <ul>
var item = lists[1].getElementsByTagName("li")[2];

{" # "x

>N?

, du,,b ., e, u, e,}" ", w " W3C DOM


HTML u| 3 } du}" HTML dubw d 2u {"
,_ ,e  u {Y` 3u e ^ d3 w b .} "

M= d} { {Y` 3u

: "3e  u dw " {" " 2 _ {_ 2u` # d } u

// Look up a node in the document


var n = document.getElementById("mynode");
var p = n.parentNode; // The containing tag
var c0 = n.firstChild;
// First child of n
var c1 = c0.nextSibling; // 2nd child of n
var c2 = n.childNodes[2]; // 3rd child of n
var last = n.lastChild;
// last child of n

.u  { w }w us dw
{, .{, " " u,{ 2u 3 { b e e
, " <html> d,bw , , ,w  e # documentElement
"u,, <body> d,bw ,,w body {,, 3  " "u,, HTML ,, ,, du,,w
._e

ub *

>NM

2 *, ,_ " nodeType { ^  {" " b


.}, ,b e, 3u} du$_# ub } * ._e | " b
{, ,_e, "u,_ HTML u,w ,_ eu,,uw dw _ ub * # ew
4 ! "
:(" 3 XML du dw dc b *)  _!
u
HTML dbw ^ :

" } :}

HTML | ^ :|
HTML :

b *
=
>
A
B

" ,w dbw 1u nodeName { { * # _ eb "


nodeValue {, }, ,| u } * # _ eub " . e 2u
,w (,w ~,ux ,w },w u,s d,w ., e 2u " | } u }
*, d,w ,\ .,u , { " 3 | } 
, {, " ,b ~,x w u J} du%3" 3 u{ d"uw " }w
.u 

HTML du{

>NN

eu, u,w {" ^ " HTML dubw  uw " _ d" w


eu,{ e HTML du " .e  u * #
u, 2, dw 0u dw .} HTML dbw du{ uw u} u _ "

{Y` 3u ex M>

{, # ,|e, <table> d,bw ^, # caption {, " }


~,x w }w us dw ._ u} bw 2 uw u} e caption
.u  { " w (w

u uw "u_

>NO

", | W3C DOM uw HTML du 2  | dw u " ^


,w  e DOM " _ d" w .{ HTML u uw u} du{
img d,bw ^, u,w u,} ,_ " d src { " 2|e 0u 2
style {, #  u | dw p "uw " ^ .  | {
d}w us uw " *  4w ._e 0}_ " CSS du _ {
. _  e"w

} |

>N@

" nodeValue { " _ { eu_  e} d} | dw


: | e} b ^ "
// Find the first <h1> tag in the document
var h1 = document.getElementsByTagName("h1")[0];
// Set new text of its first child
h1.firstChild.nodeValue = "New heading";

{, 2  ,| d#u } e nodeValue { | w 3
2 3 2 _ - 2 _ " dw eu%3" \ 3  e " data
. " } 2 _ cu u 3
d,} ,_ ,_e, ', ,_ {,  "_ } ` _ _ {
, ,uw ,# " w bw d}
4 b 0u .{ u } <h1> dbw
,# , {, <h1> dbw d 2 } u " #  w  }
:2 }
<h1><i>Original Heading</i></h1>

2, ,b innerHTML {, # u}, t  dw " ^


"uw _ u # e3 W3C DOM { IE4 DOM # ew {  .{
e,"w ,w "uw3 e}3 . e eux}X 2" dub"3 # d"uw " {
, dw c " .  3" w 3" {  uw 4 # Yw IE4 DOM
}, uw } b 3 <h1> dbw ^ uw 2 b 2 _ cu t 
.we w { " " "  _ { 

M? d} { {Y` 3u

"u}u |

>NA

,| 2u,` W3C DOM , ,u u, 3 , }, ,| w 3


2u,` ,_ ,b du,%3" # "u,_ , dw . e " {" "u}u
du,%3" 3 , e " b ^ 2# 2 _ cu 3 - {X "
. ,e, 1u, "3e  " } 3 dub u 2u` _
:{ v  d 2u # }
// Find a <ol> element by name:
var list = document.getElementById("mylist");
// Create a new <li> element
var item = document.createElement("li");
// Append it to the list
list.appendChild(item);
// Create a Text node
var text = document.createTextNode("new item");
// Append it to the new <li> node
item.appendChild(text);
// Remove the new item from the list
list.removeChild(item);
// Place the new item at the start of the list
list.insertBefore(item, list.firstChild);

e 2u " {Y` 3u wu| ^ # } c 0u ^ 2 w #uw


, ,_e, u}, ,  b ^ 2 _ a"X dw W3C DOM # _
:_e u <b> * # d 3 "_ b dw wu|
function embolden(node) { // Embolden node n
var b = document.createElement("b");
var p = n.parentNode; // Get parent of n
p.replaceChild(b, n); // Replace n with <b>
b.appendChild(n);
// Insert n into <b> tag
}

M ""Y_ {} DOM

>O

., , {u,3` ""Y_ {} b"3 M {3" " IE4 DOM


DOM wu, 2 du,{,wu ,_ { "u} e3 d DOM ^ * 
DOM d,uX du,e,b]3 _ ""Y_ {} |uw 3 N du{3" .{ W3C
u, ", ,w IE4 DOM # # ` { w ` _e eux}X " W3C
# IE4 DOM # { " ._e s" 2 " " " # ~w  e u}
_ { 1#   be " ~w "  " W3C DOM uw _ eu3u|
.uw } eu W3C DOM uw
4 x

{Y` 3u ex MM

u w ewu}

>O=

' " ._e eux}X getElementById() %3" # IE4 DOM


u}, , e, ,w ,} all[] d," # uw  u }u dw
:_
var list = document.all["mylist"];
list = document.all.mylist; // this also works

getElementsByTagName() %3" # eux},X du, w IE4 DOM


tags() %3" ^, all[] d," d3" ,` 2 3 ,_e, d u, d"u_
. " ,3 , e, dw 3 u dw  _ _e |
:we <ul> dbw 3  " " <li> dubw }u d u "
var lists = document.all.tags("UL");
var items = lists[0].all.tags("LI");

u,w " HTML d,bw 1u, ,uw all.tags() %3" d,w ,_ ,_ {


._ "3 K"w -3

{" # "x

>O>

X2u` W3C DOM " 2u w IE4 DOM " {" # "x


du, ,w M ""Y,_ {,} :{, ,w du,{, 1u " 3u| .{
# parentNode du, w 3  " children[] { childNodes[]
wu,, d, [ ""Y,,_ {,,} .,,_e,, u},, parentElement {,,
. ", W3C DOM " w du { 3 nextSibling firstChild
, IE4 DOM _ {  " W3C DOM 3 IE4 DOM w 3u| ^
e,w } 3 e eY[ u| :{ HTML dubw d3u
, # d,, ,, ,, " ,, },, ',, " .{, {,," ,, #
" ) .{, ewu}, ,wu , e, innerText 3 innerHTML du{
(.  s" innerHTML d"uw " d}w u w {

"u}u 3 } 2  |

>O?

, b wu du M ""Y_ {} {" ^ dub


W3C DOM " ,, du,,,,b ,,u ,, u,, ,, .},, W3C DOM "
, ",, ,|e, 3 ,," HTML du,,,,bw u,, u,,w u,,} eu,,{,,
, , ^, e,} d} | dw .w u w  w " u{
u, bw "u_  uw . &u} 2 innerText { w " " }

MN d} { {Y` 3u

. be 2 cu } 3  e JuX 2  " e}
ecu, u, 3 -, "  u, d,w e, %3" Z IE4 DOM
eux},X innerHTML , "u,w {, # u, . " {" ^ dub
HTML d}" ^ uw " d} _ e 2u` u w _ _e
 3  e HTML b| e ~uw "u_  1u ._ cu 
, 0u, , u,w . " d,}_ e"u,_ ub } | w {x %3" 
u, 3 |u,w 3 O W`,{, #, ,_ d, ,w {, "uw {
. _ d#u uX { "u} ` uw " {  2" dub"3
,_ {, , outerHTML 1u w dc wu { d" IE4 DOM
du,,,,,,%3" , ,,,, 3 ,,,,,,_e, ,,,, cu,,,,,, " 2 d,,,,,,} 3 ,,,,,,
u,,, # . " insertAdjacentText() 3 insertAdjacentHTML()
,w ""Y,_ {,} # "u " u # eux}X 3 w 3  e u} u#
, w (w ~x " u d"uw " |e { u# innerHTML -
._ v_ d}w u { "

DOM d"ub#u

>OM

W3C DOM # 2 ,w , " " _ w e}Y` w b


 ,cw w 2 w  " " IE4 DOM # "  " 3 _ u}
u %3" ^ 2 w e"w uw 2 " _ _ u} eu %3" # |e
:0u dw . u " 3 " DOM # eux}X _ e {
if (document.getElementById) {
// If the W3C method exists, use it
}
else if (document.all) {
// If the all[] array exists, use it
}
else {
// Otherwise use the legacy DOM
}

CSS du e{Y` :DHTML

>@

3 CSS HTML 2 , ,,_ v, ,,_| ,,,,u u, ,,X HTML u,,,,w DHTML


,` ,_  e u} duX | dw {Y` # :{ {Y` 3u
du,DOM " .,uw , ,u 2 ,w e,s 3 {, ,u d " u {

{Y` 3u ex MO

style {, uw u} _ " style { ^ IE4 3 W3C


,w style {, u, .,_e, | " } d 3 { HTML "
,_ {, , e, ^, -, ,uw }, "u d u d}" w ` du
. " CSS u uw u} eu{
", ,_ ,uw }, style {, ^, e , ^ b 0u dw
# |e 2 " 2 dw uw _ | " (color) a" CSS {
d" CSS {, ^, 1u, ,_ euc ._ u} e.style.color "ux
-3, # 3 {, u u {Y` 3u " 2 u} { 1u { u
{, ", | dw  w uw ._e u} ^[_ -3 uw } K"w
{,,,,,,,,,,, # e ,,,,,,,,,,, ^,,,,,,,,,,, " background-color CSS
,3 , ],3 ", ^, ._e u} e.style.backgroundColor
1u  3 { ! dI3 ^ {Y` 3u " float CSS { : "
.{ cssFloat {Y` 3u " 2 u} {
d,w 2 # ,|e, ,_ _e | d u# du{ CSS "u}
e3, " u,{  # e} ._ u} du dw d |
u,w ", 3 {, du,{ .{  { " ~x "
",, position {,, ,,w ,,b .,," w"u, _ u, X e,,{Y`,, d,,w
{, ,| dw left 3 top du{ # |e   absolute
,w .,_ u} (c du3 u " `X v w) ^
^ ._e | " d# height 3 width du{ v||
esu visibility { w hidden " 2  uw #u " 2|e "
. _ es " 2 visible " 2  uw vu 2u# " Y 3  _
e,} {, }," * # " du{ 1u| " _ _ {
, ,| 1u,c .}, , - _ width 3 left u eu{ dw
" 2 3 3 _ x| }" w "  u4 } uw dw 3 e du{
u}, {, ,`X -, ,_ px d}," #
4 ,) ,_ u, }"  w
, ", w u 3 { w (w du{  # 03 " .( e
: e

M@ d} { {Y` 3u

u/|
u 3 fixed relative absolute . { db" ecc[
.('X) static
. W[ 3 uw dux Y 3 X u}
duX
. dw
u {  " _ du . {  u .d#u}X v||
.e | " |uX " _ du d3" { |uw
dw none 3 inline block # "ux u u . u ecc[
.e |
4  _ du
u e u dw . 2 w (hidden) esu u (visible) es
.uw  u w eu { ` c  e  &u}
visible : u .}w eu| [ _ #3u| 2 d# # d} e}3
duX") scroll ({ e #u d}) hidden ( e " })
.(13 " " uX") auto 3 (  2u ec
rect(top right bottom :"} .  u d} # ew [

{
position
left, top
width
height
zIndex
display
visibility
overflow

clip

left)

e, "u,w , ., e 2u " DHTML d u euuX ^ # }


# 3 ,we {" - w `X = " ^ nextFrame() wu|  e
ue N " 2 _ cw {Y` 3u w u| _e u} setTimeout()
{,, # u},, u,,w wu,,| e,, "u,,w > # ,,X.,,_ e,, "u,,w3 ,,w
._e e # { 3 _e e " visibility
<h1 id='title'>DHTML Animation<h1>
<script>
// Look up the element to animate
var e = document.getElementById("title");
// Make it position-able.
e.style.position = "absolute";
var frame = 0; // Initialize frame counter.
// This function moves the element one frame
// at a time, then hides it when done.
function nextFrame() {
if (frame++ < 20) { // Only do 20 frames
e.style.left = (10 * frame) + "px";
// Call ourselves again in 50ms.
setTimeout("nextFrame()", 50);
}
else e.style.visibility="hidden"; // Hide it.
}
nextFrame(); // Start animating now!
</script>

{Y` 3u ex MA

d# X 3" 3 u 3"

>A

{, {Y`, 3u 2  " dw " ^ _ {  #u "


du,,,,bw # X , 3" du,,{,, # u},, HTML du,, 23" " d},,
3 HTML "u}, # X ,3" du,{, {, ,# 03 " .{ HTML
2}, " .{, , ,_! }, u} wu u dw u{  _ eubw
.e *3 on uw u1u  :{  # X 3" { 1u 03 03
,w u, d,w 2,|e, " u{  _ dHTML dubw 03 13 2} "
,,[ ,_ {,, ,, ,_! 13,, ",, " ,, " .{,, ,, ,_!  ,,w "u,_
._e e " # X 3" } eu 3"
e 2u# /_ eux}X dubw
| 2 "uw <img>
u X # _ | 2u_ 2 - 1 du 3 <body>
 u " | 1 du
" uw  dw " d_ 2 u" 3 2  "u u 1u|
 b w false
" ^_3 u 1u|
| 2 "uw 2 w u <img>
u X w _ | 2u_ 2 } 1 du 3 <body>
false " uw  dw _ 2  "u 1 du 3 <body>
 b w
" uw  dw _ 2 u" 3 2  "u 1 du 3 <body>
 b w false
_ 2 u" 1 du 3 <body>
u_ 2 "uw <object> <iframe> <img> <frameset> <body>
e u | 
" d_ 2  "u u 1u|
" cu {_ u 1u|
d3" # " 2 "u u 1u|
X eu u # db dw  d3" w " 2 "3 u 1u|
 b w true " uw b"3 uX {3 "
" d_ 2 u" u 1u|
" uw 2 _ JuX # db dw 1 2 _ JuX duu| <form>
 b w false
X d# | <frameset> <body>
false " uw | # db dw 1 | duu| <form>
 b w
2 eu <frameset> <body>

# X 3"
onabort
onblur
onchange
onclick
ondblclick
onerror
onfocus
onkeydown
onkeypress
onkeyup
onload
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
onreset
onresize
onsubmit
onunload

MB d} { {Y` 3u

onclick ,x # u# X ,3" # e,w ,b"3 e}3 _ _ {


e},,,bw ",,, ,,,w ,,,_e, , e,,, " onsubmit 3 onmouseover
(,w ',X uw u xw u| _e uc ( 3 " " ) # X 3"
false ", # X ,3" ^, ,b 0, " w . u 1u " 3" w
1u, (1, ^, 2  | u X ^ w }" u) 'X  b w
", e,}3 :{, onmouseover # X ,3" v,  du} . e
u {3 " " X eu b"3 _e {_ X ^ d3"
. b w true " # X 3" _ 2 c e

{Y` 3u duwu| 2 w u# X 3"

>A=

,w HTML du,,bw (DOM) , e, 0, } * " _


2,, ,,w ,,bw u,, 3 ,,e,  u,, {Y`,  3u,, du,  2,,
uw <form> dbw ^ d3u u b . be " e du{
,wu ,# " w "_ # X 3" uw onsubmit # X 3" { ^
:{ $}
document.forms[0].onsubmit

{Y`, 3u, }, du,}," 2 w HTML # X 3" u [b


*, # u, u,w u,} {Y`, 3u, { " 3 " e3 e }
{, eu_ # X 3" ^ u dw  .{ wu| `w { } d}"
: &u} w { w " 2 w " wu| ^ _
function validate() { // Form validation function
// check validity here
return valid;
// return true or false
}
// Now check user input before submitting it
document.forms[0].onsubmit = validate;

}X d# X 3"

>A>

{, {Y`, 3u, " d# X ,3" e,u 0, ,x du,{ "


e,3  " , d},X dueb]3 d# X 3" .{b " ~w " d}
0, W3C "u} 0 :"ub#uu uw _ " 3 3" 0 uo}
0,,, 3 ({,,, ,,,}Y " W3C "u},,, {u,,,3`) ""Y, ,_ {,,,}
u,| u, ,# {, " , ,,\X e, ,3" du,0, , .M W`{
,w },w us dw ._e 2uw " u0  d}X dueb]3 # d
._  | duu}_

{Y` 3u ex N

3" us x
*,, , x #  , 3" u, s d# X , 3" d}, X du,,0,, "
,b| du,_ {u " u} 3 u_ {3  3"
" . ,be, " u "u} " 3" e du{ 2 w  3
,w ,3 2 w 3" e  W`{ 3 W3C 3" du0
,w ,3" e, ""Y,_ {,} 0, " . ,e  # X 3"
,3" ,_ dX event { " `w  e  3 2
# },X 0, ,  " uo} . e !  e d3" 2 "
, ,w u,w 3  ,e, u} 3" du{ dw e|3u} du1u
" },w u, dw .{ ` } dub"3 w d"ub#u
{ " 3" ~x w 0  # ^ " 3" e d"uw
.u 
3" "u} x
,_ , # d, d,w , u# X ,3" u 3" duX 0 "
du,0, " u, .,e   { _ #3w 2 d3" 3"
u,X u, u,w -, w u {" " |e u 3" }X
# X ,3" ^, # ,w d,3 ,w 3 _ X "u} w
# u ,3" W3C 3 W`,{ du0 " .b " %# X "
,w u,| ,e, u,X , u {" " 3 e *3 e
# 1,_ , ,b .{,  d3" 2 d,w ,3" ,_ ,w d
u# X 3"  uw } d {x du# X 3" |uw u
" .,," e, ,,w 2 %# ,,X " " 1,, , 3 3 ,,be, " , 3"
,,u u , 3" *,  # e, w W3C 3 ""Y, _ {,,} du,,0,,
,}b ", %# ,X ", x " ` # w " ^_
d,w v,|| , ,w ._e { |uw du{ w "3ux
, ^, 23" ,u d3" ,_ d" du^_ 1u| %# X
, 2 d,w # X ,3" ^ |e Xe *3 w <div>
, e,x 3 ewu,x eu," # X ,3" *, 1u,| .u,w {x w
 1u %3" e3  3" }w "u} # u _ " " eu|
.{ 3u} 0 " "u_

N= d} { {Y` 3u

# X 3" {x x
du{ w " 2 w u4 u# X 3" W3C 3" 0 "
^, e 0  " `w .e  &u} du
,|e, 2 e, u,w _ " addEventListener() %3"
,w .u,w {,x ,w " 3" dw " # X 3" wu| ^
,,[  , 3" ^,, d,,w 2,,|e, }, X du,,,,uw " , , 
.u" {x w # X 3"

{Y` 3u e} du{ 3

>B

d}, {, {Y`, 3u, du,d#u, u,X "


4 , e} w
. ,e, 0u, , 1u, ,|e, u,{Y`, _ eu w eu{ 3
{, du{Y` 
4 :{ Ju du{wu - u{ 3 |3
Ju,X w"u,_ ^ e ^ d3" # " d3X |e e Z w d}
3 e, u, d#uu, # db dw dc du{ 3 ._
d "u}, {, }x . 3 u{Y` | 2w"u_ "# # db u
" ,_ }, eu,{ 3, # " e3  " 3 e} du{ 3 #
,w eu,{Y`, ` %| .e {u ub"3 0 dud#u uX
,_ "u_ 2u| b"3 " u{Y`  b :w 1u " u"u_  _
.  ` uw c dub"3 " { `
2u` x {u x
d`x, "3 # _ " eu 3 uX du{ u{Y`
d , 3 ) { 3  .w |e uw "uw eu`
,_ ,,e, 2 # u,, 3 {,, d,,X,w e,,{Y`,, d,,w
,e, w"u,_ ,_ d,c (wu, du, v,u w u {Y`
2u," {,x ,w # u { 3   w 3 ._ X e}
. e (wu du d3" " x_ du 3" 3 u# X 3"
u3X d"b x
1,, ,, " " value {,, ",, },, " u,, u,,{Y`,,
._ | FileUpload

{Y` 3u ex N>

x 3 ^3}` du 2 u} x
du,,eu,, d,,w " e, w"u, _ , o| 23,,w ,,|e, u,,{Y`,,
.}w news: u mailto:
uX }w x
,_ u _ " db"3 duX |e {Y` ^
. cw " w"u_ o| ` c  xw {
eu du w 2_ J x
" about:cache ,x # about: du,eu, ,|e, {Y`
.w
X u| 3 2uX duX x
u, 3 u, d, # "u u ^[_ duX |e {Y`
._ u 2 " 23w duX
# u}, , u,w .{ {wu e} du{ 3 { _ _ {
du, u}, ,w *3, ,_,_ d!, &u, 3 2ub, eb {Y` 3u
wu uu` = d# u dub"3 } " . _ 2 # u!
2 ,_ #u,w # u, ,_ ," e}Y`, du,{ 3, d,w dw"u_ | |
,| u, 2  {_ u 3 {Y` | (eb duX u) duX
.e duX d#

N? {Y` 3u

{Y` 3u

e,,uw ,w" d,w e, , d3u, u}_  duuw {


{Y`, 3u, ,w| u " .{ d} { 3 } {Y` 3u d w"u_
DOM 3  ,be, ", e"w " ( ) e DOM 3 u_ " w }
e,,uw ,w" # eu,{, . e s" u " w W3C >
 ,e, (,w HTML du, " {Y`, 3u, 2u,,uw w _ "_
# e, s u,  , _ {,, ,, ,, ~,,x ,, #u,, " .{,, ,, -,,
, " eb]3 ` 3 d} { {Y` 3u u { } {Y` 3u
,s" DOM # d, ,[ 3 eu,b"3 ,[ {Y`, 3u # e}3" [ "
.{
3 u,$,_ , {, , du,*, uw euw# {Y` 3u _ u #
. ", e, 3 e," {, {Y` 3u euw w" " du
", ~,x ,|e, .{ "
4 !   ~w _ eu" {
._ X { w {  " "

{Y` 3u ex NM

1u ^ uw  " eu {
3u ^uw ^
wu| ^ du3
" u 3 u
^ {
ew u dw u e ^
HTML | ^
e 2u " DOM du
_e e"w " DOM dueb]3 3 _e u
2u# 3 "u| u 1u
HTML ^
uw eub # d | d3" w u
^ " HTML dbw ^
| X # du} *
3" us
HTML d 3"3 1 ^
{Y` 3u wu| ^
d w| 3 u{
"3 dwu
HTML | ^
1 " d 3"3 ^
" } d ^
<area> u <a> * # X
b"3 e eu
eu" du{wu 3 w|
b"3 d"uw " u
{" " eb
 # eux}X
{Y` 3u " u d duX $_
u} x db ^
c .ux dw v| "ux
u d d"uw " u
ub u { ^
u}" uw "u_
HTML ^ CSS } &
^ " } # d
d[ } d 3"3
b"3 " u_ u X

Anchor
Applet
Arguments
Array
Attr
Boolean
Comment
DOMException
DOMImplementation
Date
Document
DocumentFragment
Element
Error
Event
Form
Function
Global
History
Image
Input
Layer
Link
Location
Math
Navigator
Node
Number
Object
Option
RegExp
Screen
Select
String
Style
Text
Textarea
Window

NN {Y` 3u

Anchor

?=

(=> d} { {Y` 3u)


. " d"cu ^
Element :# }

"}

?==

document.anchors[index]
document.anchors[name]

?=>

,_ {, name {, uw <a> dbw ^ d 2u Anchor e


. 3"e "u_ w " d"cu ^ u dw

u{

?=?

name x

.<a> dbw # name { "

*u"

?=M

Location.hash Link Document.anchors[]

Applet

?>

(== d} { {Y` 3u)


.3u ^uw ^

"}

?>=

document.applets[i]
document.applets[appletName]
document.appletName

u%3" 3 u{

?>>

e, du,%3" 3 u, 2u ^uw e ^ du%3" 3 u{


,|e, {Y`, 3u, }, .{ 2 - e  _ } e3u ^uw

{Y` 3u ex NO

._ e " ^uw d3u du%3" 3 w u w " 3u du

Arguments

??

(= ECMA > {Y`e == } {Y` 3u)


.wu| ^ du3

"}

??=

arguments[n]
arguments.length

??>

23" " 3 {, , ,| wu,| ^ dw 23" " u3 e


"u, wu,| 2 w (w Arguments e w arguments } wu| dw
,w ,3 2 w _ } d u 2 u _ { d" u3 e . "
d u, 1u,| ., 3 13 3 = { 03 3 .  wu|
,3 e u3 e du w x|   wu| w 3 2 w _
.uw  eu u3  w wu| | " `

u{

???

callee x

,w| " ,| d,w .{,  0u " 2_ _ ewu| w d"u


= ECMA NN {Y`e => {Y` 3u .{ 1uew
.{ | wu| ^ dw 23" "
length x

> {Y`,e, == {Y`, 3u, .wu| w  du3 |


.{ | wu| ^ dw 23" " = ECMA

*u"
.Function

??M

N@ {Y` 3u

Array

?M

(= ECMA > {Y`e == } {Y` 3u)


.2 uw 2 _ "u_ 3 " u

#u
new Array()
new Array(n)
new Array(e0, e1, ...)

?M=

// empty
// n undefined elements
// specified elements

} "}

?M>

2  " uw |e ? ECMA 3 ? {Y`e => {Y` 3u "


" ," ^, ,  # 0b3 uw _ 3_ 23" " u"ux # e}
:0u dw . w  " u u"ux  u ._ %#u 3 u
var a = [1, true, 'abc'];
var b = [a[0], a[0]*2, f(x)];

u{

?M?

length x

, e 2u " " u | _ e}/e ^


2u, " d , }, , "3u, ," ,u ,_ d ", " u 3
,| .{ |uw " "  # 3 ^ _ e
w " 2 ` u 3 _ 3 # " " {  " 2 
. e

u%3"
concat(value, ...) x

,  du,3 # ^ 1u  # _  be w d d"
, concat() du3 # 1_ b . e `| "  uw
.2 , , ,e, , ," , ,w 2 u uw " ^
.? ECMA ? {Y`e => {Y` 3u
join(separator) x

3 }," ,w ," ,u # ^ x| # _  be w " d}"

?MM

{Y` 3u ex NA

, 2 w separator # u} uw u d }X w Y
. e u u w " _
pop() x

^, " ," 0, 3 , be w 3 " e w " " 


.? ECMA NN {Y`e => {Y` 3u ._e _ 3
push(value, ...) x

, 0, 3 ,_e " du} w "  u u "


.? ECMA NN {Y`e => {Y` 3u . be w " "
reverse() x

. be w d[ ._e $` " " u v||


shift() x

u # 1_ 3  be w 3 _e - " " 3


,,3 ^,, " ," 0,, 3  "3e, |,, "u,, ^,, " ,,uuw
.? ECMA NN {Y`e => {Y` 3u . e u_
slice(start, end) x

d"u, , # ," ,u d3u _  be w d d"


.{,, (,, 2 ,, du},, ,,w) end d"u,, ,, u,,| start
.? ECMA NN {Y`e => {Y` 3u
sort(orderfunc) x

., be, ,w " ," 2 ,w d"u 3 _e v| " " u


2 # d, d, `  e v| " _ _ {
,| d,w " ewu,| ,|e orderfunc d"u} 3 . }u
" 3  ,cw ,3 3 ,uw "_ wu| .u s" d#uv| ecc[
, b w # }_ d" uw e3 # }_ 03 3 _ e|"
e,3 # ,|K",w 03 3 b 3  b w uw ww 3 b
. b w # |uw d" uw
splice(start, deleteCount, value, ...) x

, ,| d"u, # *3, u,w " ," ,u # |


" ," " , 2 " " ,uuw du,3 ,w 3 _e -

NB {Y` 3u

.{, , -, ,u d3u, ,_ , be, ,w d," .,_e


.? ECMA NN {Y`e => {Y` 3u
toLocaleString() x

=N {Y`, 3u, . b e w " " d e d }" u


.= ECMA NN {Y`e
toString() x

. be w " " d}" u


unshift(value, ...) x

e,x ,u 3 _e " " #u " "  du3 u 3


" , " , 0,, . ,, #u,,w u,, u,, d,,w u,,| ,,_e, u,,wu "
.? ECMA NN {Y`e => {Y` 3u . be w

Attr

?N

(= DOM)
.HTML ^ {
Node :# }

u{
name x

.e- .{ 1u
ownerElement x

.> DOM .e- .{ {  d3u _ d e


specified x

^, ,| u, 3 , }, " {, ,w { " _ e|" "


"  " 3 { true 2 " uw | {Y`
.e- .{ false 2 "
value x

.e}/e .}" ^ " w { "

?N=

{Y` 3u ex O

*u"

?N>

Document.createAttribute()
Element.getAttributeNode()
.Element.setAttributeNode()

Boolean

?O

(= ECMA > {Y`e == } {Y` 3u)


.ew u dw u e

#u

?O=

new Boolean(value)
Boolean(value)

   new c 23w wu| ^ 2 w Boolean() e}3


2 3 _e x| (Boolean e ^ ) ew " ^ w "  "
null NaN  w e true " w x| u 1u| . be w "
new ,c u,w Boolean() d#u, e}3 ."" e| d}" 3 undefined
Boolean e, ^, " " ,u 3 , e 1u " "u_ 2u   
.\Xe

u%3"

?O>

toString() x

. be w "false" u "true" " ew e " w }w


valueOf() x

. be w { \X ew e 23" _ " d3w ew "

Comment
(> DOM)
.HTML | ^
Node :# }

?@

O= {Y` 3u

u{

?@=

.} } dub du{ 2u d" u4 | dub

u%3"

?@>

splitText() , ,w " }, dub du%3" 1u| | dub


._e eux}X

*u"

?@?

.Text

DOMException

?A

(= DOM)
. e 2u " DOM du

u{

?A=

code x

, u}, 2 }c w vx \ d"uw " " e|us _ u "


(u, du 3) {  d` u # ew . e 2u {
. | # " _! du{wu |

u{wu

?A>

u,w HTML du, uw "u_ " { ` _ " code u # du{wu


du}, du,{, u,{,wu , ,_ ,_ {, . e 2u   u
.2 # u d du du{ } DOMException
DOMException.INDEX_SIZE_ERR = 1 x

.}" u " du " " 2_ # 3 du


DOMException.HIERARCHY_REQUEST_ERR = 3 x

{,," " eu,, ,, ^,, " ,,b ^,, },,b d,,w %,,|
. uwu

{Y` 3u ex O>

DOMException.WRONG_DOCUMENT_ERR = 4 x

.{ }u " 2 _ d # d " b # u} dw %|


DOMException.INVALID_CHARACTER_ERR = 5 x

.{ {u ( ^ 1u "
4 ) eu d
DOMException.NOT_FOUND_ERR = 8 x

. {u  we uw _ eu " b ^
DOMException.NOT_SUPPORTED_ERR = 9 x

. e eux}X DOM e_ d#u uX " { u %3" ^


DOMException.INUSE_ATTRIBUTE_ERR = 10 x

4 x _ e " Element ^ w Attr ^ 2  w" dw %|


.{  w" dc Element b w
DOMException.SYNTAX_ERR = 12 x
.CSS { | "
4 d"} du

DOMImplementation

?B

(= DOM)
._e e"3 " DOM u 3 #ue

"}

?B=

u%3"

?B>

document.implementation

createHTMLDocument(title) x
,u 2 " 3 ,_e, u, HTML , *, # , e, ^
" 2 3 ,, e, ",, <body> 3 <title> <head> <html>
. e " <title> " _ { e} title . b e w
.> DOM
hasFeature(feature, version) x

" ,  e,b]3 # , , {,3 , d#u, uX b

O? {Y` 3u

", ", , " 3  be w true " `w eux}X


e|", " ,uw ,  e},3 Z, ,b . be w false
,w " , eb]3 d#u uX  _  be w true "
version 3 feature .,`w eux},X u,{,3 1u| uw u_ "
u,,,, "core", "1.0" 
4 ,,,, },,,, },,,," *,,,, # 3 ,,,,
."html", "2.0"

Date

?=

(= ECMA = {Y`e = } {Y` 3u)


.2u# 3 "u| uw "u_

#u ?==
new
new
new
new

Date();
// current time
Date(milliseconds) // from timestamp
Date(datestring); // parse string
Date(year, month, day, hours, minutes, seconds, ms)

d3" ,_ ,_e, u, Date e, ^, ,3 23w Date() d#u


,w " 2  ,  2 w d 3 ^ b .{ | e 2u# 3 "u|
%3" ,,| , _ d,,b ,,w , ue, v,, ,,w "u,,| e, 3" u,, 2,,
 ,  d}," 3 ^ b ._e '  e  b w getTime()
#u w "  " ._e x| "u| ^ d}" u 2 w " 2
, " e, 2u,# 3 "u,| du, ,_ e  d 3 { u| 3
%3" .}, d"u,} (u, 3 0u,) 03 du,| 3 du}, ,w u, 1u,| ._e
2u,# # e, 2u,# du, ,w ,_ {, exu cu Date.UTC() du}
._e u} eu
 du,3 ,w    new c 23w Date() _ euc
. be w " e_ 2u# 3 "u| d}" u 3 _e e|

u%3" ?=>
3 "u| u w ewu} b `w  " e} c\ Date e
e,` :," `, 3 u,%3" ,_ . ,be, " 2 du%3" # 2u#
" "UTC" -3, ,3 ,_ e dc 3 _e "u_ e 2u# uw _ e
, .,,_e, "u,_ (GMT u, UTC) eu,, 2u,,# # u},, u,,w 3 {,, ,, 1u,,

{Y` 3u ex OM

du,3 3 e},bw u, ,_ _ { ._e _! # " " e} du%3"


d#u,, "u} # ,,x  ,,e, , _! , ! ,_ set() du,,%3" ,,_ d"u,}
"u| du # 1_ eu du # * dw .e eux}X ECMA
._  get() 2bub %3" w
get[UTC]Date() x

3 = ,w e},bw " . be w eu u e {3 w " u #3"


.{ ?=
get[UTC]Day() x

,w e},bw ", . be w eu u e {3 w " } #3"


.{ (x) O 3 (x`)
get[UTC]FullYear() x

.,, be, ,,w eu,, u, e, {,,3 ,,w 2 ,," M 1u,,| u,,w " 0u,,
.= ECMA ? {Y`e => {Y` 3u
get[UTC]Hours() x

w e}bw " . be w eu u e {3 w " {u


.{ (v ==) >? 3 (v)
get[UTC]Milliseconds() x

.,,, be, , ,,,w eu,,, u, , e, , {,,,3 ,,,w " , ,ue, , ,,,


.= ECMA ? {Y`e => {Y` 3u
get[UTC]Minutes() x

,w e},bw " . be w eu u e {3 w "


.{ NB 3
get[UTC]Month() x

,w e},bw ", ., be, w eu u e {3 w " u


.{ (xu ) == 3 (I)
get[UTC]Seconds() x

3 ,w e}bw " . be w eu u e {3 w " u


.{ NB

ON {Y` 3u

getTime() x

,| ,3" , be, w ue v w " "u| e3" u


3 (eu {3 w) =B@ dI = v # dY duue
, _ _ { . be w " Date e " 2u# 3 "u|
. " (e {3) eu# d w ew" "
getTimezoneOffset() x

, v, ,w " 2u# 3 "u|  eu 3 e u w -}


2 ,w 0u, ,w ec},w , , b ,w ", _ { . be w
. " 2u}wu| " {u | }
getYear() x

%3" , ,w %3" , ., be, ,w " =B du, 0u "


.{  getFullYear()
set[UTC]Date(day_of_month) x

u, .,_e, ,| eu, u, e, {,3 w " u #3" "


. be w " "u| due
set[UTC]FullYear(year, month, day) x

eu, u, e, {,3 ,w " (#3" 3 u, d"u,} " w 3) 0u "


.,, be, ,,w " , "u,,| d, ue, u,, .,,_e, ,,|
.= ECMA ? {Y`e => {Y` 3u
set[UTC]Hours(hours, mins, secs, ms) x

,w " (,ue, 3 ,u  du d"u} " w 3) {u "


" , "u,| d,ue, u, ._e | eu u e {3
. be w
set[UTC]Milliseconds(millis) x

.,_e, ,| eu, u, e, {3 w " "u| due "


=> {Y`, 3u, ., be, ,w " , "u,| due u
.= ECMA ? {Y`e
set[UTC]Minutes(minutes, seconds, millis) x

{,3 ,w " (ue 3 u du d"u} " w 3) "

{Y` 3u ex OO

" , "u,,| d, ue, u,, .,,_e, ,,| eu,, u, e,


. be w
set[UTC]Month(month, day) x

u, e, {,3 ,w " (u, #3" , d"u,} ", ,w 3) u "


. be w " "u| due u ._e | eu
set[UTC]Seconds(seconds, millis) x

u, e, {,3 ,w " (,ue, d"u} " w 3) u "


. be w " "u| due u ._e | eu
setTime(milliseconds) x

,3 ", .,_e, ,| " "u,| d,ue, e,3" u "


. be w " milliseconds
setYear(year) x

%3" ,, ,,w %3" ,  .,,_e, ,,| " e, " > 0u,, ,, ",,
.{  set[UTC]FullYear()
toDateString() x

. be w d}" " w e {3 # u} uw " "u| {


.? ECMA NN {Y`e =N {Y` 3u
toGMTString() x

d},," ",, ,,w Z,,b {,,3 # u},, u,,w " "u,,| {,,
, , toUTCString() %3" w %3"  . b e w
.{
toLocaleDateString() x

e du  " # u} uw 3 e {3 # u} uw " "u| {


=N {Y`, 3u,, .,, be, ,,w d},," ", ,,w "u,,| {,,
.? ECMA NN {Y`e
toLocaleString() x

{, e du  " # u} uw 3 e {3 # u} uw " "u|


. be w d}" " w "u|

O@ {Y` 3u

toLocaleTimeString() x

e, du  " # u} uw 3 e {3 # u} uw " 2u# {


=N {Y`, 3u,, .,, be, ,,w d},," ",, ,,w "u,,| {,,
.? ECMA NN {Y`e
toString() x

. be w e {3 # u} uw " "u| d}" u


toTimeString() x

., be, w d}" " w e {3 # u} uw " 2u# {


.? ECMA NN {Y`e =N {Y` 3u
toUTCString() x

2 3 ,_e, x| }" ^ w eu 2u# # u} uw " "u| e


.= ECMA ? {Y`e => {Y` 3u . be w "
valueOf() x

getTime() %3" ,,,u {,,," " "u,,,| d, ,ue, , u,,,


.= ECMA == {Y`e . be w

u} duwu| ?=?


, u}, %3" 3 Date e, ,}b
4 x, ,_ , du%3" w 3
e e Date() d#u # u%3"  .{ _ |
.Date du # 3
Date.parse(date) x

e,3" u, 3 ,_e, ,| " 2u,# 3 "u| d}" u ^


. be #uw " ue
Date.UTC(yr, mon, day, hr, min, sec, ms) x

. be #uw  2u# 3 "u| dw " ue e3" u

Document
(= DOM = d} { {Y` 3u)
.HTML ^

?==

{Y` 3u ex OA

(= DOM " ) Node :# }

"}

?===

window.document
document

 ?==>
| # e` 3 { HTML ^ d 2u Document e
 s" = {Y` 3u " e  .{ d} { {Y` 3u " u
3 W`,{, ., u, 2 ,w { 3 %3" d | == {Y` 3u " 3
u, , e w d "u} du{ 3 u%3" 1_ ""Y_ {}
,s" d,c du,%3" 3 u,{, , "u}, " W3C DOM _e
.{ _

J} du{ ?==?
u4 ,xu} .,_e, eux},X " ,# du{ e dud#u uX 1u|
W`{ W3C DOM " | du{ dw dub du{
. _  s" ""Y_ {} 3
alinkColor x

, , .,_e, , " 0u duX a" _ d}"


.{
anchors[] x

,3 , " ,_ dc dw _ " w c du d"


.=> {Y` 3u .{ "  " e ^  "
applets[] x

, " ,_ e`u,w , d,w _ " w ^uw du d"


.=> {Y` 3u .{ "  " e ^  " 3
bgColor x

.{  ._e " d# a" _ d}"


cookie x

},/2, 2u,` 3  " e,u "u}" _ d}" " uw e}

OB {Y` 3u

._e  " w (w due__


domain x

,u d,w .,_e, , " , x e}} d _ d}"


.== {Y` 3u . be " u} " e}
embeds[] x

# u}, u,w , " , ,uw du,  - _ u # d"


# e,,w .{,, plugins[] - ,,} .},, <embed> d,,bw
{Y`, 3u, # u}, u,w 2,|e " ActiveX du0}_ 3 u2#u
, ", 0,}_ *, ,w ec},w "u_  euw w" . _ 0}_
.=> {Y` 3u . "
fgColor x

, , .,_e, , " } 'X a" _ d}"


.{
forms[] x

. " 1 dw e ^ u 1 du # d"


images[] x

u} uw _ d| dw e ^ u | du # d"


.== {Y` 3u .{  " " <img> dbw #
lastModified x

" , d3" , 1u, ,| , "u| _ e- d}"


.= {Y` 3u . e 2u (`x "3 %"b $u w)
linkColor x

, , ., e, 2u, " , #uw duX a" _ d}"


.{
links[] x

"

, }w X dw e ^ u X du # d"


.

{Y` 3u ex @

location x

.{  URL { w . eu
plugins[] x

.== {Y` 3u .embeds[] d" - }


referrer x

 ,X d"u, , ,w _ " d eu _ e- d}"


. e 2u  3 " "  w
title x

e- = DOM # x u| .<title> dbw e} d}


. w
URL x

.,,, e,,, 2u,,, " ,,, eu,,, ,,,_ e,,,-,,, d},,,"


.== {Y` 3u
vlinkColor x

, , ., e, 2u, " , , #uw duX a" _ d}"


.{

W3C DOM du{

?==M

" ,w " ,b du,{, , e, DOM u,w "ub#u dub"3 "


.{ | 2 dw # eu du{ 3  we
body x

, , <body> d,bw d, 2u, _ d e w d"u


.{
defaultView x

.> DOM . e  2u 2 " _ dX


documentElement x

. <html> dbw w e- d"u

@= {Y` 3u

implementation x
DOM d#u, u,X d, 2u, _ DOMImplementation e

.e- .{ d#u

M ""Y_ {} du{ ?==N


# ,w 3 M ""Y_ {} " # (Xu0u} 3) "u} du{
. | 2
activeElement x

{, 0u, 2,_, ,_ dd 3"3 w _ e- e}


._e "u ( " { " " d 3"3 2u_ e)
all[] x

,w 2,|e, ," , " ., " , du 1u| # d"


,w 2,|e, ` u 3  _ X ewu} u w v|| w "u $u
. _ u} name u id # "u du
charset x

. 2uc
children[] x

., v # u4 } _ HTML du # `} d"


1u,| d3u, all[] ,# {, 3u,} all[] uw  _ _ {
.{ {" " u { # - " u
defaultCharset x

. 'X 2uc
expando x

}u, %},b # u,   2 w false " b { 


}, e, d,uw ,b ,c "ux w . e d} { du
2u,# du, ,w ",  " 3 _ e} w e " _ uw
,_ e,,uw u`, }u w |e "u_  . e u 
{,  ._ ^_ { { 1u } " eYu| ux} # eu
{Y`, 3u, 2u,w# ,w 4, _ euuw dw |e u4

{Y` 3u ex @>

3 ^,[_ -3 _ " eu2uw# w  u x # 3  "3 d3"


, {,  [b . 3  " { u " K"w
W`{ " 2 w e " e3 _e "u_ ""Y_ {} "
.( " d [b) { ew
parentWindow x

.{  d3u _ dX


readyState x

d}," "u[ # e` 2 " ._e " 2 "uw {3


:{ #
uninitialized

.{ ` 2 "uw w *3
loading x

.{ 2 "uw 0u "


interactive x

._ u| 2 uw }w w"u_ _ "uw eu_ " w


complete x

.{ "uw
4 u_

M W`{ du{ ?==O


. | M W`{ " # (Xu0u} 3) "u} du{
height x

.`X v w  dw
layers[] x

, .{, , " , du,, -, ,_ , du # d"


-, w w O W`{ # { M W`{ " {
.{
width x

.`X v w  duX

@? {Y` 3u

J} du%3" ?==@
u4 ,xu} .,_e, eux},X " ,# du,%3" , e dud#u uX 1u|
W`,{, W3C DOM " | du%3" dw dub du{
. _  s" ""Y_ {} 3
clear() x

.,, be, ,,w , [ Z, 3 ,,_e, Ju,,X " ,, u, } 1u,,|


.{  == {Y` 3u " .= {Y` 3u
close() x

3  ,we { #uw open() %3" # u} uw _ " 2u


. be w d[
open() x

u,} ,_ ,_e #uw eu 3 _e JuX " e u}


.= {Y` 3u . be w d[ .{ 2 " 2|e "
write(value, ...) x

2 | 0u " 2_ _ d " "  du}" u }"


{, , #u,w open() u,w _ d  w u 3 _e " {
._e u
writeln(value, ...) x
, d, ^, e,3  w ` { write() u

.= {Y` 3u . be w d[ ._e u

W3C DOM du%3"

?==A

 we " w " b du%3" e DOM uw "ub#u dub"3 "


.{ | 2 dw # eu du%3" 3
createAttribute(name) x
. be w 3 _e u  1u uw Attr b ^
createComment(text) x
3 ,,_e,, u,, ,,  },, u,,w Comment ,, ,,b ^,,

{Y` 3u ex @M

. be w
createDocumentFragment() x
3 ,,_e,, u,, eu,, DocumentFragment ,, ,,b ^,,

. be w
createElement(tagName) x

3 ,_e, u, ,  d,bw 1u, u,w Element , b ^


. be w
createTextNode(text) x
. be w 3 _e u  } uw Text b ^
getElementById(id) x

,  ", uw 0 u 2 id { " _  " " d


null ,,ux ,, d,, ,,[ ,,b 3 ,, be,, ,,w {,,
. be w
getElementsByName(name) x
name { " _ " " u 1u| dub # d"
, u,w d, Z, b . be w {  " 0 u u
. be w 0 uw d" ux eb]3
getElementsByTagName(tagname) x

u, d,bw 1u, ,_ " , " , u 1u| dub # d"


,"  " u  v|| . be w {  1u 0 u
.{ } " u v|| 2u
importNode(importedNode, deep) x

{, ,u , " " ,wu ,_ ,c " eb # ^


true ", deep ,3 ,w ,b . be w " 2 3 _e u
.,_e, e,Y_ , " v dub e| " w  
.> DOM

@N {Y` 3u

W`{ du%3" ?==B


getSelection() x

. be w HTML dubw 23w " " e d u} }

M ""Y_ {} du%3" ?===


elementFromPoint(x, y) x

. be w { 3  d " _ " d

u# X 3" ?====


2u, , e, M ""Y,_ {,} 3 DOM u,w "ub#u dub"3 "
du,,,,# X ,,[b .,,_e, eux},,X " ,, e, e,, du# X , 3"
2, ,w e,3 ," ,| , e, ,w e # onunload 3 onload
. d#u uX X e du{

*u" ?===>
Link Layer Image Form Element Applet Anchor
.Window

DocumentFragment

?=>

(= DOM)
.be " d"u`} " uw _ eub
Node :# }

 ?=>=
" ,w " Node du,{, 3 u,%3" DocumentFragment e
, e, "u,}" ^, u, ._e | d %3" u { Z 3  we
,  ,e, " , , " DocumentFragment ^, _ e}3 : "
~,uw , . ,be, " , " 2 # v dub `w  e " e
eu,,b d",c d,w eucu 2 w DocumentFragment _ e
.uw "uw _ "  " uw " e _

{Y` 3u ex @O

*u" ?=>>
.Document.createDocumentFragment()

?=?

Element
(M ""Y_ {} = DOM)
^ " HTML dbw ^
(= DOM " ) Node :# }

 ?=?=
{,,} .{,, HTML d,bw u, ,, ^,, d,, 2u,, ,, e,
3 u,w ,w N ""Y_ {} u DOM uw "ub#u dub"3 4w 3 M ""Y_
3, ,w .,_e,  " u 1u| w e} 2u` uw w O W`{
3 u,{, u,o} ._e | " # du%3" 3 u{ dw
DOM "u}, 3 W3C du,%3" 3 u,{, u,w M ""Y,_ {} du%3"
._e 2uw # "  du3b " " u {  # .{ 3u}

W3C DOM du{

?=?>

" ,u 1u,| ,_e eux}X W3C DOM # _ `x dub"3 "


du,{, ,_ ," , HTML du,{ uw u} eu{ HTML
,_ d ", " .,, , # , title 3 lang id dir ,u e,
-3, # 2 u,w u,} {, "  ,e, `,| ,_ [ # HTML {
 ", u, " . ,e, u}, u,_ 2 ,_ , d,w K"w 3 ^[_
,wu " href 3 id ,u) { ^[_ -3 uw {Y` 3u " u{
! d_ HTML { 1u  " 3 " .(accessKey 3 tagIndex
, u}, d],3 du1u # u  dw  3 { {Y` 3u 2uw# "
(,w class { w "u dw className { # {Y` 3u .{
,w (,w for {, d,w ,\ .,_e, u}, HTML du,bw 1u| w
1u,| .ue u} htmlFor { # <script> 3 <label> dubw
, " .}, , ,# du{ d"  HTML u w 3 u
HTML du, 1u,| DOM u,w "ub#u, du,b"3 " ,_ ,uw } u w
.we " w " Node e du{

@@ {Y` 3u

className x

_! " CSS $_ [ u ^ _  class { d}" "


class , { className {  1u _ _ { ._e
.{ {Y` 3u d ! 2ubI3 #  dI3 #
style x

.{ HTML style { - _ Style e ^


tagName x

# , -, {, e,-, {, ^, _ dbw 1u


1u, ,uw , } ^[_ u K"w -3 uw " bw 1u `
, XHTML du, " . ,e, , b w K"w -3 uw bw
.{ ^[_ -3 uw "

""Y_ {} DOM du{ ?=??


, | e|"u,,| DOM ^,, d,,w du,,, 3 3 M ""Y, _ {,,}
HTML , , W3C DOM ,u M ""Y,_ {,} DOM " ., _
DOM , ,w 3 . " HTML du { uw u} e}Y` 3u &
:{ _ | dw " # du{ M ""Y_ {}
all[] x

" "  . v  # _ du 1u| # d"


u, w } " u " v|| w 3  _ d"b"u 2|e
" , }u dw name u id # u} c " . _ X e}
.Document.all[] .J" \ .{ " 
children[] x

{, .,, v, ,  # u4 } _ du # d"


u, }, du,b uw u} et Z M ""Y_ {} DOM _ _
d,c du, , , ^, 2,# , w uw  " |
.}
className x

,| " , ^, class {, " _ e}/e d }"


._e

{Y` 3u ex @A

document x

.{  d" w " _ d e w d"u


innerHTML x

3 d 3"3 d,,bw du},, ,,w ,, 23" " ,, HTML },,


cu,  ,  {, , ,w d", , . e3
3 d "uw "u} {  _ u # . e d}
" 2 #, 3 O W`{ u c dub"3 { w"u_X
. _ d#u uX
innerText x

e3 3 d 3"3 dbw du} w  23" " d u }


,| 23,w " 2  ,  {, , ,w d", .
._e d} cu
offsetHeight x

.`X v w 2 d} _ 3 dw


offsetLeft x
.offsetParent dub w {x X d}
offsetParent x

3 offsetLeft u,,} , _ ,,_e, , | " d, ub ,,


u, ,_ d,w . ,e, d,b# 2 v w offsetTop
 du,, ,, " " u,, ,_ {,, d,, e, offsetParent
2 , u,X ", ,w ,_ ,uw }, d3 d b u .{
. ,e, e,| offsetParent 2 w 3 2u uw |
 du, ,, ,3 2 " ,_ e, " ,w {x, 03, duu
.e
offsetTop x

.offsetParent dub w {x  Y d}
offsetWidth x

.`X v w 2 u} _ 3 duX

@B {Y` 3u

outerHTML x

, . e3 3 d 3"3 dbw w }  HTML }


3 ,, cu,, ,,u_ ",, ,,w  ,,  {,, ,  ,,w d",,
. e 2 u}
outerText x

. e3 3 d 3"3 dbw w }  ^ d u }
cu | } " w   {  w d"
. e 2 u} 3
parentElement x

.{ e- {  .{  } 3 _ d


sourceIndex x

" " 2 , _ d,, Document.all[] d, " " ,, d, u


.{  du
style x

, , }, CSS d { d 2u _ e ^
,| " , , u, d, e, , du,{ | .{
. e
tagName x

. e 2u "  HTML dbw 1u _ e- d}"

W3C DOM du%3"

?=?M

,w 3 u 1u| _e eux}X W3C DOM # _ eub"3 "


# d"u,w .} " " # du%3" we " w " Node du%3" `
", ,w 3 ,3"e, "u,_ ,w u{ u } u 2 dw du%3" 
# 1_ uw u} eu{ d" du # be " u} "
.} HTML u
getAttribute(name) x

. be w }" ^ " w " { "

{Y` 3u ex A

getAttributeNode(name) x

. be w Attr b ^ " w " { "


getElementsByTagName(name) x

d,bw 1u, d" ,_ " ,  # } u 1u| # d"


. be w } " " ex|| w } 
hasAttribute(name) x

, , " 3 true " uw }  1u uw e} b


.> DOM . be w false " "
removeAttribute(name) x

d,,[ 3 ,,,_e,, -,,, ,, ,, # " ,, ,,, {,,


. be w
removeAttributeNode(oldAttr) x
._e -  du{ { # " Attr b
. be w " - Attr b
setAttribute(name, value) x

 e &u} "  " {  2 1u _ e} w


. be w d[ 3
setAttributeNode(newAttr) x
.,_e u  du{ { w " Attr b

2 cu, , ", ,uw , ,x # 1u 2u uw e} b


u, 3 , be, w " newAttr uw cu Attr b . e
null ",,, ,,,uw ,,, 1u,,, ecu,,, ,,,c\ e|",,, "
. be w

""Y_ {} DOM du%3" ?=?N


dw " # "u} du%3" dw du3 3 M ""Y_ {}
._e eux}X du d
contains(target) x

3 true ", ,uw target , d3u  _ e|" "

A= {Y` 3u

. be w false " "  "


getAttribute(name) x

,[ ,b 3 , be, ,w " , , # { "


. be w null " uw } 3 e}
insertAdjacentHTML(where, text) x

d,3 ,w ,_ e} "  e` " " text HTML }


e` uw where ._e "  "  e where
"AfterBegin" "BeforeBegin" du,,,,,,,,,,,},,,,,,,,,,," #
. be w d[ .uw "AfterEnd" u 3 "BeforeEnd"
insertAdjacentText(where, text) x
d,3 ,w ,_ e}, "  e` " " text d u }
d,,[ .,,,_e,, " ,,, ,,, "  ,,,e,, ,,, where

. be w

removeAttribute(name) x

", " .,_e, -, # " 2 " 3 {


false ",,, ",,, ,,, ,,, " 3 true ",,, {,,,
. be w
scrollIntoView(top) x

u,X u, u,w " , , ,` u,| ,_e u w u " "


-, ,` u, 3 ,  true " top w b . b " X
false ", top ,w ,b . ,e, u X duw " 
. e u X uX "  
setAttribute(name, value) x

3 , e, &u,} "  d}" "  { w


. be w [ Z

u# X 3" ?=?O


du 3" w uX dw " # du# X 3" HTML ^ du
3 Form du, u) &u * ._e | _ 3 " 1u

{Y` 3u ex A>

3 onsubmit
4 ,,,) d,,,|e,,,| du# X , ,3" {,,, , ,` (Input
" e,u du,| 1u, d 3"3 du ,3" ,w ,_ ,_ | (onchange
. e {x
onclick x

._e   _e ^_ d3" w"u_ _ euc


ondblclick x

._e   _e ^_3 d3" w"u_ _ euc


onhelp x

, .,_e, , , ,_e, ^,_ duu| w"u_ _ euc


.""Y_ {}
onkeydown x

._e    e "u " d_ w"u_ _ euc


onkeypress x

._e   _e u" 3  "u " d_ w"u_ _ euc


onkeyup x

._e   _e u" " d_ w"u_ _ euc


onmousedown x

, , , e, "u, " ", d,_ ^, w"u_ _ euc


._e
onmousemove x

. e   _e {_ " _ euc


onmouseout x

, , ,_e, "u, d3" # " " w"u_ _ euc


._e
onmouseover x

, , , e, {,_ , d3" " " w"u_ _ euc


._e

A? {Y` 3u

onmouseup x

, , ,_e, u," " ", d,_ ^, w"u,_ _ euc


._e

*u" ?=?@
.Textarea Select Node Input Form

Error

?=M

(? ECMA NN {Y`e =N } {Y` 3u)


. | X # du} *
Object :# }

#u ?=M=
new
new
new
new
new
new
new

Error(message)
EvalError(message)
RangeError(message)
ReferenceError(message)
SyntaxError(message)
TypeError(message)
URIError(message)

2 du,$_,# # e,` u, 3 Error $,_ # d, u,#u, 


.{ d"u} message 3 .#ue

u{ ?=M>
:" { 3 2 du$_# 1u| 3 Error
message x

d}" d3u {  . e 2u " u} us _ eu 1uX


.{ d#u uX w }w3 'X d}" ^ u 3 #u w 
name x

d#u, 1u, ", {  . e 2u " u} * _ d}"


.{ }b " u} " u} e }u dw _ {

{Y` 3u ex AM

u%3" ?=M?
toString() x

. be w " u e  d}" u

?=N

Event
(M W`{ M ""Y_ {} > DOM)
3" us

 ?=N=
"u,} ec,c[ , 3 _e " 3" us 3" e
{, _ | "u} 3" e ^ > DOM .ue | " 2
.,_e, u}, e, e, # 2 du, w O 3 N M ""Y_ {} e3
> , DOM .{, 3u,} 3 , u,w ,_ " e e M W`{
,3" e, , ,w u,w {, ,` d#u, "u} " ,_, du 3"
" ,_ du ,3" ,w ,_ eu,,uw d,w # { ` M W`{
,3" e, du,{, .,uw , ,, 2 " ,w 3 O W`,{
. e s" ub du{ " ! M W`{ 3 ""Y_ {} DOM
,w ,3 2, ,w ,3" e, W`,{, 3 DOM 3" du0 "
,_ d ,3" e, ""Y,_ {} 3" 0 " u . e  # X 3"
, ! ,,X e, event {,, " ,,_e, , | " , 3" |,
. e

DOM du{wu

?=N>

e_ #u u } eventPhase { dw #u u u{wu 


. e 2u w 3" dw " 3" "u}
Event.CAPTURING_PHASE = 1 x

.{ 0u" d " 3"


Event.AT_TARGET = 2 x

.{ - b | 2 %# X 0u " 3"

AN {Y` 3u

Event.BUBBLING_PHASE = 3 x

.{ ewux "u} d " 3"

DOM du{

?=N?

.e- e  du{ 1u|


altKey x

2 ", ,uw ,  "u, Alt ,_  ,3" #3w 2u# " b


.{ | " du 3" dw .{ true
bubbles x
true 2 ", ,_e X ewux "u} _ uw e # 3" b

.{ | u 3" 1u| dw .{


button x

u, 3 2, u," u, 2,  "u, du ,3" " ,_ _e


-, .{ _ | " d_ 1_ {3 2 _ ^_
,_ ,_ { .{ {" d_ > 3 3 d_ = W[ d_
{,3 ,| d,_ ,_ {, , ,| eu# { 
{,_ ,3" ^, #3,w , " ,_ eu,#
4 , , ,w u,w :w
. e u} {  { }c uX d_ "
^, # ,w ,b e, { e}w[ " w {  3 w
., e, %",b " u, ,uw , },c uX " d_
t  ._e u} ? 3 > = # > 3 =  du w O W`{
.{  O= W`{ "
cancelable x

,, preventDefault() e,, u,,w 2,,}w ,,_ e|",, "


" 3 true {, , ",  _ " 3" w (w 'X
.{ false " 
clientX, clientY x

d,u ,w {x, " ", cu, Y 3 X u,} u,{, 


u,{, , ,_ ,_ {, ., e, 2u b"3 dX d}
.be " " 2 " "

{Y` 3u ex AO

ctrlKey x

2 ", ,uw ,  "u, Ctrl _  3" #3w 2u# " b


.{ | " du 3" dw .{ true
currentTarget x

, " .{, ,3" , ,w eb" 0u " 2_ _ b


.{, target ,b # 3u} b   3" ewux "u} 3 }b
.{ | u 3" 1u| dw
detail x

3 ^,_, dw ? ^_3 dw > ^_^| dw = :^_ |


",, 2,, u,," 3 2,,  "u,, ^,,_ du ,3" d,,w .,,
.{ |
eventPhase x

", , u,w " , ,| du,{wu . 3" "u} e_ d


.{ | u 3" 1u| dw . e 2u " {  #u
metaKey x

2 ", ,uw ,  "u, Meta _  3" #3w 2u# " b


.{ | " du 3" dw .{ true
relatedTarget x
"3 # ,x ", _ { eb  mouseover du 3" dw
mouseout du ,3" d,w .{, "u 2 # e b w 2

"3 2 ,w e, b # 2 "u # w " _ { eb 


.{ |  3" * u dw .{

screenX, screenY x
u,w d,b w {x " " cu Y 3 X u} u{ 

,| ", du ,3" dw ._e | w"u_ d W[ 3


.{
shiftKey x

2 ", ,uw  "u Shift _  3" #3w 2u# " b


.{ | " du 3" dw .{ true

A@ {Y` 3u

target x

_ { .{ _ u " 3" _ eb  3"  - b


du,,b ,w , 3 ,uw }, b e} eb |e  _
.{ | u 3" 1u| dw .{
timeStamp x

d,w ., e, 2u, " 3" #3w {u 3 "u| _ "u| e ^


"u,| }, ",x ud#u uX e3 { | u 3" 1u|
._ %"b " dx}
type x

2 #u, # on -3, } w uw # X 3" 1u 2u  . 3" *


4 .{
u ,3" 1u,| dw .mousedown u 3 load click 3" 
.{ |
view x

.{  X 2 " 3" _ dX e

DOM du%3"

?=NM

preventDefault() x

" ,3" , ,w (,w ',X _ be `x b"3 w


,wu * # 3" b . 1u (uw } 3 e [ b)
. be w d[ . " d %3"  ux
stopPropagation() x

db, ewux "u} 3 - 0u"  " 3" }w "u} #


. be w d[ ._e

M ""Y_ {} du{ ?=NN


altKey x

"u, Alt _  3" #3w 2u# " _e _ ew d"


. u { 

{Y` 3u ex AA

button x

u, ,_ ,[ _e button { " du 3" "


^, e,-  .  " u " du_
W,,[ d,_ ,_ {,, ,,3" e|",, " = {,w :{,, ^,u{,w
d,_ _ { 3" e|" " > {w uw  "u "
,_ {, ,3" e|" " M {w uw  "u " {"
.uw  "u (d_ du" " ) " eu d_
cancelBubble x

,_ db, |uw du w 3" "u} # w # X 3" b


.w true " {  w uw
clientX, clientY x
.`x b"3 d w {x  3" #3w Y 3 X u}
ctrlKey x
Ctrl ,_  ,3" #3,w 2u,# " ,_e, _ ew d"

. u {  "u
fromElement x
et, ,w fromElement mouseout 3 mouseover du 3" dw

. e "u 2 # " cu _ " "u


keyCode x

, u ` d " keyCode _ du 3" dw


._e " " _ d3 w
offsetX, offsetY x
x u} } w {x  3" #3w Y 3 X u}
.(srcElement .J") 3"
returnValue x

,w u4 ,3 ,_ d", w 2 "   d" {  w b


, , d,w . " 1,|  ,e, , b ,w # X ,3" d3
, ,,w {,  " 2 d3" ,3" ,_ es,,x ,, ',,,X
.w false " {

AB {Y` 3u

screenX, screenY x

.u d w {x  3" #3w Y 3 X u}


shiftKey x
Shift ,_  ,3" #3,w 2u,# " _e _ ew d"

. u {  "u
srcElement x

.{ _ u " 3" _ d u 3  X e


toElement x

et,, ,,w toElement mouseout 3 mouseover du ,,3" d,,w


. e  2 w " cu _ " "u
type x

1u, 2 ", .,_e, , " 3" * _ d}" { ^


# X , 3" e, }3 ,  ,,w u,,w .{,, on , X du,, # X , 3"
 ,3" e, type {, "  e   onclick()
.{ click
x, y x

,w {x, " u,} {  . 3" #3w Y 3 X u}


u,X ", ,w CSS # u}, u,w ,_ ,b w " |e3"
._e 2uw { |

M W`{ du{ ?=NO


height x

" " u,_ u, X dw . e | resize du 3" "


._e # | # X
layerX, layerY x
,b ,w " d, ,w {x, " ,3" #3,w , Y 3 X u}

._e

{Y` 3u ex B

modifiers x

"u,  ,3" #3w 1uc " b| du_ 1_ _ _e


`,} |e _ { ^u{w ^ d "  . 
Event.ALT_MASK du,,,,,,,,,{,,,,,,,,,wu # 1, ,,,,,,,_ ,,,,,,,,, #
u,,,,,,,,,,,,,,, 3 Event.META_MASK Event.CONTROL_MASK
" {,, ,  u,, ^,, {,, ,,w .,,uw Event.SHIFT_MASK
.{ | O= u O W`{
pageX, pageY x
{, .,b"3 d, ,w {x,  3" #3w Y 3 X u}

,w {x, , }, u,w d w {x u}  _ _


.b w " d

screenX, screenY x
.u d w {x  3" #3w Y 3 X u}
target x

.{ _ #3w 2 " 3" _ d u 3   X e


type x

1u, 2 ", .,_e, , " 3" * _ d}" { ^


# X , 3" e, }3 ,  ,,w u,,w .{,, on , X du,, # X , 3"
 ,3" e, type {, "  e   onclick()
.{ click
which x

,_ ,_e, , which ", u _ du 3" dw


d,,w .{,, ,, u,," u,  "u,, ",, d, _ u, , _ 1, _
 "u, ,_ d " d3u {  _ du 3"
,w _ { ? u 3 > = 2 " " du 3" dw .{
. e 2u " {" 3 eu W[ d_ v||
width x

" " u,_ u, ,X duX . e | resize du 3" "


._e # | # X

B= {Y` 3u

x, y x
layerX u,w - ,} u{  . 3" #3w Y 3 X u}
" ) ,,b ,,w " d, ,,w {x,, " {, 3 },, layerY 3

. e 2u ( 3 "

?=O

Form
(= d} { {Y` 3u)
HTML d 3"3 1 ^
Element :# }

"}

?=O=

document.forms[form_number]
document.forms[form_name]
document.form_name

u{ ?=O>
" <form> , du,{, # 1,_ dw " eu{ 1 e
,| target 3 name method encoding action x # HTML
._e | " # du{ 3 w ._e
elements[] x

du, d, 2u, _ d 3"3 due # e- d"


u, 3  ,_ d",b,u "u uw 2|e " " .} 1 "
1u, # {, , ,| u, name {, ", _ eu dw
. _ u}
length x

.{ elements.length 0 u .1 " du |

u%3" ?=O?
reset() x

., be w 'X " w " 1 d 3"3 u # 1_ "

{Y` 3u ex B>

.== {Y` 3u . be w d[


submit() x

.,_e, 0u, " onsubmit # X 3" e3  e | " 1


. be w d[

u# X 3" ?=OM


onreset x

d,w . ,e, e, 1, ,u ", 2 b w # X {"


false ",, ,,uw u,, ",, 2,, ,, b ,,w # db,,
. b w
onsubmit x

# X ,3"  . e e 1 2  | # X {"


d,w ._e  " w"u_ | "3 " { e"w 2u`
. b w false " uw 1 2  | # db

*u" ?=ON
.Textarea Select Input Element

Function

?=@

(= ECMA = {Y`e = } {Y` 3u)


.{Y` 3u wu| ^

#u ?=@=
new Function(argument_names..., body)

=> {Y`, 3u, " e,3 ., "3 == {Y`, 3u, " #u, 
. e u} wu| | } "} # 2 du w 3  

u{ ?=@>
length x

d,w ., e 2u " wu| | 1uc " w 1u du3 |

B? {Y` 3u

# , ,|e, , ,,,  du,,,3 e, ,3 , ,| 2 , ,_ ,,,


== {Y`,,,, 3u,,,, .,,,,_ u},,,, Arguments.length
.= ECMA > {Y`e
prototype x

,| " eu,%3" 3 u,{, 1u| #u wu| ^ dw _ et


.{,, J},, #u,, ,,| ,, }u,, du,  , w , _ ,,_e,
.= ECMA > {Y`e == {Y` 3u

u%3" ?=@?
apply(thisobj, args) x
du, 3 ,_e, e, thisobj # e,3" 2, w " wu|
, b w " . e 2 w wu| du3 2 w " args d"

NN {Y`,e, => {Y` 3u . be w " wu| |


.? ECMA

call(thisobj, args...) x

du,3 3 ,_e, e, thisobj # e,3" 2, ,w " wu|


, , b ,w " . e 2 w wu| du3 2 w " uuw
NN {Y`,e, =N {Y`, 3u,, ., be, ,,w " wu,| ,|
.? ECMA
toString() x

u, u,d#u, u,X # e,w " . be w " wu| d}" u


= {Y`,, 3u,, .{,, wu,,| d,,uw },, ",, ,,w d},,"
.= ECMA > {Y`e

*u" ?=@M
Arguments

Global
(= ECMA = {Y`e = } {Y` 3u)

?=A

{Y` 3u ex BM

.d duwu| 3 u{

"}

?=A=

this

 ?=A>
 . " e c " " d du%3" 3 u{ Global e
,b , .,_ e, e,u e, # { 1# " u%3" 3 u{
d, e, du,{, ,w ,x| _ | uw } " ewu| u }
# "u " e) uw } " |e e3  " eu d e . e
{, {Y`, 3u " ._ "u 2 w this dI3_ # u} uw (u%3"
3 u,{, e, , .,_e, , d e 2 w X e d}
. _ "u 2 w window " w 2|e 3  " dc } du%3"

d du{ ?=A?
Infinity x

}, {Y`, 3u, . e 2u " {uew {x _ d d"


.= ECMA ? {Y`e =?
NaN x
ECMA ? {Y`,e, =? }, {Y` 3u .d "

.=

undefined x
ECMA NN {Y`e =N } {Y` 3u . | "

.?

d duwu| ?=AM
decodeURI(uri) x

du, w 2 " _  be w " uri # eub" d ^


.{,, ,,  ",, ,,w d, euc u,, , b du,,,,
.? ECMA NN {Y`e =N } {Y` 3u

BN {Y` 3u

decodeURIComponent(s) x

du, ,w 2 " ,_ , be, ,w " s # eub" d ^


.{,, ,,  ",, ,,w d, euc u,, , b du,,,,
.? ECMA NN {Y`e =N } {Y` 3u
encodeURI(uri) x

du, w 2 " _  be w " uri # d"b" d ^


.{,, ,,  ",, euc u,, , b du,,,, u,,, e, w
"u,_ ,w URI d, 2 ,_ , d,w ,_ @ 3 ? # ,u eu
=N }, {Y`, 3u, .,e, b d w x| 3"e
.? ECMA NN {Y`e
encodeURIComponent(s) x
du, ,w 2 " ,_ , be, w " s # d"b" d ^

.{,, ,,  ",, euc u,, , b du,,,, u,,, e, w


"u,_ ,w URI d, 2 ,_ , d,w _ " d"b du
=N }, {Y`, 3u, .,_e, ,b d, ,w x| 3"e
.? ECMA NN {Y`e
escape(s) x

du, ,w 2 " ,_ , be, w " s # d"b" d ^


.{,, ,,  ",, euc u,, , b du,,,, u,,, e, w
? ECMA " = ECMA = {Y`,e, = }, {Y` 3u
3 encodeURI # ,,,,,,uw 2 du,,,,,, ,,,,,,w 3 ,,,,,, ,,,,,,
. _ u} encodeURIComponent
eval(code) x

" ,,,u 3 ,,_e,, ewu,,#" " {Y`,, 3u,, },,, # d},,"


. be w
isFinite(n) x
d , ,[ ,w ,x| wu u 3 w eu} ^ n _ e|" "
NaN (2 ,x| ,u u,) n ", ,b ., be, ,w true uw
., be, ,w false ,uw {,ue,w e, u, {,x u 3 ( )
.= ECMA ? {Y`e => {Y` 3u

{Y` 3u ex BO

isNaN(x) x
true ,,uw ( ,,) NaN (2 ,,x| ,,u u,,) x ",, ,,b
,w x| wu u 3 w d " ^ x _ e|" " . be w
= {Y`,e, == {Y` 3u . be w false uw 2
.= ECMA
parseFloat(s) x
2 3 ,_e, ,x| , ^, w (" s X d u 3) s d}"
NaN ", uw *3 dx} uw s b . be w "

= {Y`,  3u,, .,, be, ,,w (= {Y`,  3u,, " u, 3)


.= ECMA == {Y`e

parseInt(s, radix) x
3 _e | ^ w (" s X d u 3) s d}"
", ,uw , *3 dx} uw s b . be w " 2
d"u, } ,,3 .,, be, ,,w (= {Y`,  3u,, " u, 3) NaN
 ,3  b ._e " (?O 3 > w) dux radix

,X u,w }," ,_ e|", " u, 3 = ',,X dux uw


.{,,, =O ,,,uw ,,, *3,,, "0X" u, , "0x" e, , euc u,,,
.= ECMA == {Y`e = {Y` 3u

unescape(s) x

{,, ,, d",,b" escape() # u},, u,,w ,,_ " d},,"


.,, be, ,,w " s d,, eu,,b" d,, .,,_e, eu,,b"
 ? ECMA " .= ECMA = {Y` e = {Y` 3u
3 decodeURI() # 2 du,,,,,,,,, ,,,,,,,,,w ,,,,,,,,,uw 3 ,,,,,,,,,
._ u} decodeURIComponent()

*u" ?=AN
.Window

History
(= d} { {Y` 3u)

?=B

B@ {Y` 3u

."3 dwu " }" u v

"}

?=B=

window.history
history

u%3" ?=B>
back() x

d, [ . ,,be, ,,w e, x d,, "3,, eu,, ,,w "3,, dwu,, "


. be w
forward() x

. be w d[ . 3"e "3 dwu "


go(n) x

, -1 ", u,w %3"  b . 3"e e eu w {x 1n eu w


. be w d[ .{ back() 2  u  

?>

Image
(== d} { {Y` 3u)
.HTML | ^
Element :# }

"}

?>=

document.images[i]
document.images[image-name]
document.image-name

#u ?>>
new Image(width, height);

u, " 2 2|e _ _e u # "u d| #u 


",, ,,u e, " ,,b .},, d"u,} height 3 width du,,3 . 
, eu, d,u ,w " | b"3 _ e vx  | src {
._ eX

{Y` 3u ex BA

u{ ?>?
,x # HTML <img> , du,{, # ^, , d,w | e
,,,| e},,, hspace 3 vspace height width border src
:{ " " # &u du{  w 3 ._e
complete x

,b .{, false 2 ", ,uw 2, "uw 0u " # | b


" { _ #3w eu 2 du " u 3 1u| | 2
.{ e- {  .{ true 2
src x

{, , ., e, 2u " | eu _ e}/e d}"


{, e,3 {, <img> d,bw src {, d,_ `, u4
,, du,,,, # d"u,,w ,_ {,, , u,, " 2 ,,w &u,, ,,|
1u, uX " w {  " | uw (DHTML) uX HTML
. cu c | uw d| e vx _  e

u# X 3" ?>M


" ,# ", , " 3  we " w " # X 3" | e
:_e |
onabort x

. e   _ " | d"b3 w"u_ b


onerror x

. e   _ #3w eu | d"b3 1uc b


onload x

. e   " 1u| w { uw | 2 "uw _ eu#

Input
(= d} { {Y` 3u)
1 d 3"3 ^
Element :# }

?>=

BB {Y` 3u

"}

?>==

form.elements[i]
form.elements[name]
form.name

u{ ?>=>
d,,bw du,,{,, # ^,, ,, u,,w u,,} eu,,{,, d 3"3 e,,
. " tabIndex 3 size readOnly maxLength ,,,x # <input>
:_e | " # du{  w 3
checked x

d 3"3 , ^ _e _ e}/e ew " ^


, u, {, (true) , ^,[ e " d_ u _uw^[ * #
.(false)
defaultChecked x

d 3"3 , ^ _e _ e}/e ew " ^


u 3 e `| #u " e}3 e " d_ u _uw^[ * #
. u { ^[  e  b w 3 {u w
defaultValue x

I3",b u, }, d 3"3 " ,  2u } _ d}" d"


, " ,3 ", ,w 2,  b w # X u 3 `| #u "
,3X *, # d 3"3 ,u ,w {  e} w ._e
. " d
form x

.{, ,}b ", 2 " , _ e e w e- d"u


.{ | d 3"3 du * 1u| dw { 
name x

,| HTML " name {, d,3 ,w ,_ d 3"3 ,  1u


.{ | d 3"3 du * 1u| dw {  . e
type x

`, {, , .,_e, , " 1, , *, _ d}"

{Y` 3u ex =

" 2 eu,, u,, .{,, HTML " type {,, ",, d,,_
du, .{, "text" ',,X ", { { # 03
2 ,` u, _ " { ^ Textarea 3 Submit
"textarea" 3 "select-multiple" "select-one"
.== {Y` 3u .{


_
_uw^[
3X d"b
2uX
1 | e`b d_
e } 3"3
u e " du_
2 bw d_
d^ } d 3"3
1 | d_

"button"
"checkbox"
"file"
"hidden"
"image"
"password"
"radio"
"reset"
"text"
"submit"

value x

d 3"3 u dw . e u} 1 | 1uc _ d}" "


"  2u e3 wu }  3X 3 I3"b } * #
, "   u " | dw |e .{ 23"
3 ,| ,_ *, # d 3"3 du, dw . | " {
d3" v,[w 2, ,w ,_ {, d}," {,  " 2 bw
 u, value d}," ,c * " . e  u _
du, " value {, e,} w _ _ { . e
.{ e-
4 3X *

u%3" ?>=?
blur() x

1u,| d,w ., be, ,w d[ 3 e | " _ 2u_


.{ | 2uX * # u
click() x

d,,[ 3 ,,_e,, ,, ,, d3" ",, 2,, ^,,_ ,,u

== {Y` 3u

_u,w^,[ ,_ d,_ du, *, d,w . b e w


.{ | | 3 2 bw  "
focus() x

u, 1u,| dw . be w d[ 3 be " _ 2u_


.{ | 2uX * #
select() x

d,w ., be, ,w d,[ 3 ,_e, u} " " }


e, d,,w .,,_e, "u, _ ,,3X 3 I3",,b },, *,, du,,
.{ | Textarea

u# X 3" ?>=M


onblur x

. ,e, e, , e | " _ 2u_ _ e}3


.{ | 2uX * # u 1u| dw
onchange x

3 I3",b }, u, }, 3"3 du, d,w # X ,3" 


,| " , 23" }, w"u,_ ,_ ,e,   eu# 3X
"u,_ ,_ u, 2w  we 23w # " _ 2u_ 3 e
# ,_ d,_ ,, d,,w ,,c "u,,x ,,w .{,, ,, 1u,,| ,3
. Xe " e   e
onclick x

, " _u,w^[ _ d_ du dw # X 3" 


  d3" " 2 ^_ 1uc | 3 2 bw
, b ,w false wu,|  b 2 bw 3 | * dw . e
. e 1u 2 bw u | "u_
onfocus x

. e e _e {u" " _ 2u_ _ euc


.{ | 2uX * # u 1u| dw

{Y` 3u ex =>

*u" ?>=N
.Textarea Select Option Form

?>>

Layer
(d} { M W`{ )
. } d ^

"}

?>>=

document.layers[i]
document.layers[layer-name]
document.layer-name

#u ?>>>
new Layer(width, parent_layer)

 ?>>?
-, O W`,{, " 3  ,e eux}X M W`{ " e
{, , u, " %,_! { e3 { "u}
4 u_ e  .{
,w ,_ HTML , , .{, M W`,{ " u du duX | " u| _
{Y`, 3u " uw  absolute " 2 position CSS {
"u},, d, bw u,,w , |e, ,, " . ,,e,  u,, , ^,, u,,w
._ u Layer() d#u uw u 3 <layer>

u{ ?>>M
above x

.e- .uw } 3 b   d3" d


background x

. d# |
below x

.e- .uw } 3 b   # d

=? {Y` 3u

bgColor x

. d# a"
clip.bottom x

.top w {x  %w du euX dx Y d}
clip.height x

",,, 2 ,,,w , , ",,, 2  u,,,w ., , %,,,w d, ,u d,,,w


._e | clip.bottom
clip.left x
.left w {x  %w du W[ dx X d}
clip.right x
.left w {x  %w du {" dx X d}
clip.top x
.top w {x  %w du euw dx Y d}
clip.width x

",,, 2 ,,,w , , ",,, 2  u,,,w ., , %,,,w d, ,u du,,,X


._e | clip.right
document x

.{ 3 23" " _ e w e- d"u


hidden x

2 ,w , 2 _ 2uX dw ._e " 2 w es u 2uX


.w 2 w false " 2 2 _ es dw 3 w true "
layers[] x

, .,, v, , , # _ due 1u| d3u d"


.{ document.layers[] du d" u
left x

, ", ,| .2 d3u, , u, w {x   X d}


x u,w - ,} left . ,e, {" u W[ w 0u} vx {
.{

{Y` 3u ex =M

name x

.  w (w HTML dbw name {


pageX, pageY x

, ,_ ,_ {, .u,w , , w {x  Y 3 X d}
# 1,`\ ,w {x, , {, u,w , d, w {x u}
.  d3u du
parentLayer x

.  (3) d3u dX u w e- d"u


siblingAbove, siblingBelow x

3 e) { " w 2 uw _ "  # u 3" d u{ 


, ,uw }, 3 eu [ b . e 2u ( " eu`
. be w null {
src x

.,_e, , " , u,} eu, ,_ e}/e d}"


2 u,} ,b"3 _ e vx {  w eu 2 
. u " " 2 3 w " eu
top x

, ,| .2 db w " u w {x   Y d}
.{ y uw - } top . e }" uX u uw vx {
visibility x

" ._e " 2 w es _ e}/e d}"


."inherit" 3 "hide" "show" : " eu
window x

.{ }b " 2 "  # -   _ dX e


x, y x
top { uw - } y 3 left uw - } x . Y 3 X u}

.{

=N {Y` 3u

zIndex x

, d3" , 3 e}3 .u d}X v|| u z v|| " {


3 be " uw " uw } d|uw zIndex _ d }e
zIndex d" ,, d, 3 ,b .,_e, " c d
{ }b " |7w layers[] d" " _ d uw d3u
.}e { u
4 x _ d d3"  3 e u 4w

u%3" ?>>N
load(src, width) x

 ", wu, " , du,X ", _e "uw w " eu ^


. be w d[ 3 _e |
moveAbove(other_layer) x

. be w d[ 3  we c d duw w " 
moveBelow(other_layer) x

. be w d[ 3  we c d # w " 
moveBy(dx, dy) x

. be w d[ 3  e {_ e { w {x "
moveTo(x, y) x
3  ,we, ,X u, ,3 d, ,w {x, (x, y) { w "

. be w d[
moveToAbsolute(x, y) x
y) {,, ,,w " ,,

d,,[ 3  ,,we,, ,, ,,w {x,, (x,

. be w
resizeBy(dw, dh) x

. be w d[ 3  e |  2 w " d#
resizeTo(width, height) x

. be w d[ 3  e |  d# w " d#

{Y` 3u ex =O

?>?

Link
(= d} { {Y` 3u)
.<area> u <a> X ^
Element :# }

"}

?>?=

document.links[i]

u{ ?>?>
dw .} 2 eu # e} - 3 " X du{ # d"uw
,# (e,) eu, $u w  e  _ d" # du{ # 1_
:{
http://www.oreilly.com:1234/catalog/search.html?
q=JavaScript&m=10#results

hash x

, ,w " eu c { _ e}/e d}" { ^


."#result" :0u ._e 2 d}w # d
host x

d"u, 3 2u,w 1u, {, ,_ e}/e d}" { ^


:0u,,,,,,,, .,,,,,,,,_e,,,,,,,, ,,,,,,,, " eu,,,,,,,, u,,,,,,,,b"
."www.oreilly.com:1234"
hostname x

" eu, 2u,w 1u, {, ,_ e},/e, d}," { ^


."www.oreilly.com" :0u ._e
href x

2u,, " eu,, ,,u_ },, ,_ e},,/e,, d},," {,, ^,,


. e
pathname x

" eu, , 1u, {, ,_ e},/e, d}," {, ^


."/catalog/search.html" :0u ._e

=@ {Y` 3u

port x

" eu, ub" d"u { _ e}/e d}" { ^


."1234" :0u ._e
protocol x

" eu,, , `|3X {,, , _ e},,/e,, d},," {,, ^,,


."http:" :0u ._e
search x

,w " eu, d,X {, _ e}/e d}" { ^


:0u,,,,, .,,,,,_e, ,,, ,,,,, 2 d,,,,,}w ? d, ,,, ,,,,,
."?q=JavaScript&m=10"
target x

" u_ e) X e ^ 1u _ e}/e d}" { ^


u, 2 " ,uw d,X , ,_ " (b"3 duw dX u
target "u} { 0 u {  ._e  
"_blank" &u,, du,,1u,, # 2,,|e, ,, " .{,, HTML "
. _ u} "_self" 3 "_parent" "_top"

u# X 3" ?>??


onclick x

" . ,,e,, e,, ,,_e,, ^,,_ ,,X d3" w"u,,_ e,,}3


",, 2,, b ,,w u,,w ,,|e, # X ,3" , == {Y`, 3u,,
. X v| # u false
onmouseout x

. ,e, e,  ,we 23w d3" # " " w"u_ e}3


.== {Y` 3u
onmouseover x

u, " . ,e, e,  ,we X d3" " " w"u_ e}3
,b . ,_ ,| e, dX status { dw d" 2|e
, " " eu, ,ux ,_ ,e, b"3  b w true "

{Y` 3u ex =A

. u {3

*u" ?>?M
.Location Anchor

?>M

Location
(d} { {Y` 3u)
.b"3 e_ 2u`

"}

?>M=

location
window.location

u{ ?>M>
,X e, " , eu, ,w (w du{ 2u d" 2u` e
href hostname host hash ,, d,,w .target du},, ,,w {,,
,| ._  X e w search 3 protocol port pathname
,w .,_ "u,w , eu # " b"3 _ e vx u  # 1_
location {, ,w eu, d}" ^ 2  &u} uw |e xu 2
._ "uw d X

u%3" ?>M?
reload(force) x
force 3 .e "uw3 "3 u 3 2u du # " d"u
 ,e u_ e#uw ~uw uw true 2 " b .{ d"u}
.== {Y` 3u . be w d[ .uw ` | ` 3
replace(url) x

d," ,` 23,w ,_e, cu, d,c , u,w " d"u


.,, be,, ,,w d,,[ .,,_ u,, ,,b"3 dwu,, " d,,
.== {Y` 3u

=B {Y` 3u

*u" ?>MM
.Window.location Link

?>N

Math
(= ECMA = {Y`e = } {Y` 3u)
.eu" du{wu 3 uwu|

"}

?>N=

Math.constant
Math.function()

 ?>N>
,w $,_ , .{, e,u" du,{,wu 3 u,wu| dw e Math e
d#u, ,c\ .,_e, | " u # dx String 3 Date -
eu,%3" , ,wu,| Math.sin() u ew| 3  " 3 Math()
._ e d3" _

u{wu ?>N?
Math.E x
.ex }"uc dux e {wu
Math.LN10 x

.= ex }"uc
Math.LN2 x

.> ex }"uc
Math.LOG10E x
.e = dux }"uc
Math.LOG2E x
.e > dux }"uc

{Y` 3u ex ==

Math.PI x
. {wu
Math.SQRT1_2 x

.> 13 d" w | =
Math.SQRT2 x

.> 13 d"

uwu| ?>NM
Math.abs(x) x
. be w " x "
Math.acos(x) x
.{ 2u " 3 w e}bw "  be w " x $_J"
Math.asin(x) x
2u, " /2 3 /2 ,w e},bw ", , be, w " x $J"

.{
Math.atan(x) x
2u, " /2 3 /2 ,w e},bw ", , be, w " x {]u|J"

.{
Math.atan2(y, x) x

{, ,w d,3# -, _  be w 2u " 3 w d"


,| wu,| du,3 v,|| w .{ (x, y) d 3 X " {x
._
Math.ceil(x) x

{,, x u,,w ,,ww u,, ,,|K",,w ,,_ " e,, ,, ,,|^,,


. be w
Math.cos(x) x

. be w " x d  " $_

=== {Y` 3u

Math.exp(x) x

. be w " x 2| w e {wu "


Math.floor(x) x

{,, x u,,w ,,ww u, ,,|^, [_ , _ " e,, ,, ,,|^,


. be w
Math.log(x) x
. be w " x ex }"uc
Math.max(args...) x

d,3 b . be w  du3 2u # " 3 |K"w


NaN u,3 # e,` ,b ., be, w Infinity uw 
 ,_ ,x| , ,w " 2 2,} _ uw d d" u 3 uw
#u, ,3 > ,w u4 , wu,| , ? ECMA # x u| . be w NaN
.{
Math.min(args...) x

,b ., be, ,w ,  du,3 2u, # " ,3 ,|^[_


u,3 # e,` b . be w Infinity uw  d3
,x| , ,w " 2 2,} ,_ uw d d" u 3 uw NaN
,3 > ,w u4 , wu,|  ? ECMA # x u| . be w NaN  _
.{ #u
Math.pow(x, y) x
. be w " y 2| w x "
Math.random() x

.,,,, be, ,, ,,,,w = 3 , ,,w " e u,,,,|x,,,, ,,,, ^, ,,


.= ECMA = {Y`e == {Y` 3u
Math.round(x) x

. be w " x w |^
Math.sin(x) x
. be w " x $

{Y` 3u ex ==>

Math.sqrt(x) x

. be w NaN uw # }_ x b . be w " x "


Math.tan(x) x

. be w " x {]u|

*u" ?>NN
.Number

?>O

Navigator
(= d} { {Y` 3u)
.b"3 d"uw " u

"}

?>O=

navigator

u{ ?>O>
appCodeName x

1u,| " v,  ._e 2uw " b"3 v _ e- d}"


" d"ub#u,, d,,w .{,, "Mozilla" W`,,{,, du,,b"3
.{ "Mozilla" v  ""Y_ {} dub"3
appName x

W`,{, d,w .,_e 2uw " b"3 1u _ e- d}"


", ""Y,_ {} dw .{ "Netscape" {  "
.{ "Microsoft Internet Explorer" { 
appVersion x

" b"3 d` 3 {3" w (w u _ e- d}"


" }"  b .{ {3" d"u }"  03 { ._e 2uw
, be w " e {3" " w parseInt() wu| w
3 e, {,3" ", ,w parseFloat() wu,| w " 2 b 3
", d,w ., be, ,w "3u, , , ^ " w " e

==? {Y` 3u

# ,b"3 {,3" d"u,w " " d,c u,s {  d}"


u, ., e, 2u, "  ,e, , 2 d3" ,_ eu, },
.{ } "uw } dub"3 w u  vu uo}
cookieEnabled x

0u b"3 " ue__ e 2u _ e- ew " ^


.O W`{ M ""Y_ {} .(false) u (true) }
language x

2u,, " ,,b"3 {,3" ',,,X 2u,,w# ,_ e,,-,, d},,"


{, , " 2uw# e3 "u} " {  " . e
4 ,,
d,,w "fa" u, 3] d,, d,,w "fr" 3 e,c d,,w "en"
,w 3, ,_ ,uw e, ,X d}," { `  " .[e"u
-, ,_ "fr_CA"
4  e 2u " eu du 2uw#
M W`,{ .[2 e"u dw "fa_IR" u 3] {  uu_ d
2u,w# u,w ,w" " 3u,} { 3 M ""Y_ {} _ _ {
._e s"
platform x

", d",{, d`, u,/3 u } _ e- d}"


d,w d "u}, u, d, [b . e 2u " b"3 #u
"Win32" 2 0, u, # e,w e,3  " 3 { 
.=> {Y`e .} "Linux i586" 3 "MacPPC"
systemLanguage x

2u,, u,,w " ,,u }, ',,,X 2u,,w# ,_ e,,-,, d},,"


, }b language W`{ d]3 { " " _ eu"
.M ""Y_ {} ._e 2uw
userAgent x

w"u,_ ,u , dw u} " " _ e- d}"


2 ",
4 , .,_e, | " b"3 | HTTP duuu| "
^, d3,, ,,w navigator.appCodeName ",, # `,,}
.{ navigator.appVersion " w 3 _

{Y` 3u ex ==M

userLanguage x

" ,_ eu," 2u, u,w " w"u_ 2uw# _ e- d}"


.,_e, 2u,w , ,}b language W`{ d]3 { "
.M ""Y_ {}

u%3" ?>O?
javaEnabled() x

" 3 true " uw 0u 3 eux}X e b"3 " 3u b


.== {Y` 3u . be w false " " 

*u" ?>OM
.Screen

Node

?>@

(= DOM)
. {" " eb

u$_# ?>@=
DocumentFragment Document Comment Attr
.Text Element

u{wu ?>@>
,_ }, b du$_# # eu HTML ^ " ub 1u|
, ,_ " nodeType {, ^ b e . w uw "
eu, u # du{wu .{ . du$_# # ^_ # d _e
,, },, Node du}, du,,{,, u,, ,_ ,_ {,, .},, nodeType
3 N M ""Y_ {} " u .e }u b * # _ eu du{
u}, ,w d , u, # ,uw "_, dub"3 "  | O u
:_
Node.ELEMENT_NODE
Node.ATTRIBUTE_NODE
Node.TEXT_NODE

= 1;
= 2;
= 3;

// Element
// Attr
// Text

==N {Y` 3u


Node.COMMENT_NODE
= 8; // Comment
Node.DOCUMENT_NODE
= 9; // Document
Node.DOCUMENT_FRAGMENT_NODE = 11; // DocumentFragment

u{ ?>@?
attributes[] x

d, ," attributes {,,, ,,,uw ,,, ^,, e,,b ,,,b


.}, , du,{ - _ { Attr du # e-
, d,w 2,[ . _ e u { 1u u "u w 2|e " " 
#
4 , ,  " ,3 , " u} { ^ HTML {
. e u} attributes[] d"
childNodes[] x

,b , # dub d3u _ { ub # e- d"


, 0, u,w d," {,  uw } d# b b .{
.{
firstChild x

3 ,_e, "u, b  # b 3 w e- { 


.{ null 2 " uw } d# b b
lastChild x

3 ,_e "u b  # b  w e- { 


.{ null 2 " uw } d# b b
nextSibling x

,,,,w (,,,,w childNodes[] d, ,," " , ,,_ d,,,, ,,,,b


" null u, 3  ,be, " b  # w uw parentNode
.e- .uw } 3 eb [ _ eu#
nodeName x

,_e, , " 1u {   dub dw .b 1u


dub dw . "3 { w " 2 tagName { uw 2|e _
,b ,c * dw ._e " { 1u {  Attr
.,_e, , " ,b *, ,_ {, {,wu d}," ^, " 
.e-

{Y` 3u ex ==O

nodeType x

. }b uw " _ } eu{wu {  eu u .b *
nodeValue x

d3u, {  | 3 } dub dw .b ^ d}" "


.{, { " d3u Attr dub dw .{ b e} d}
.{ e}/e { 
ownerDocument x

, , du,,b d,w .{, 2 # e,w ,b  _ d e


.e- .{ null {
parentNode x

}, d3 _ e|" " null u 3 b  dub u 3 b


" .," ,3 ,b ,b Attr 3 dub _ _ { .uw
,w #, 3 ,, u, 4, u 3 } w # _ eub
.{,, null {,, ,, ",, ,,,, 3,, ,, {,,"
.e-
previousSibling x

,,,,w (,,,,w childNodes[] d, ,," " , ,,_ d,,,, ,,,,b


" null u, 3  ,be, " b  # x uw parentNode
.uw } 3 eb [ _ eu#

u%3" ?>@M
addEventListener(type,

listener, x
useCapture)

{, d}," type .u,"e {x w b  dw " 3" ^


,_e, 2u,w 2 #u, # "on" -3, }, w u,w " 3" * _
4 )
e,}3 .{ # X 3" wu| listener .(submit u click 
2 ,w ,3 2, ,w Event * # et  e   wu| 
, ,,uw (true) ,, useCapture ",, ,,b . ,,e, 
}, ,3 u, 3 ,uw false ,b .{ b * # # X 3"
> DOM . be w d[ .{ d u # X 3" ^ uw

==@ {Y` 3u

. e eux}X O u 3 N M ""Y_ {} "


appendChild(newChild) x
, childNodes[] d" du} w 2 3 uw " newChild b

,uw , {" " x # b b ._e u {" w b


,3 . ,e, u, , {, " ,w 3  ,e, } w 03
. be w " newChild
cloneNode(deep) x

, deep ", ,b ., be, ,w ,b , # d,c d


.e d" w e| " w b 2# uw (true)
hasAttributes() x

., be, w uw u ew d" ^ b  b


.> DOM
hasChildNodes() x

. be w uw } d# b b
insertBefore(newChild, refChild) x

, {," ,w refChild ,b # ,x {" " newChild b


,b ,b .,uw ,b , # d,# ,uw refChild .,_e u
. ,,e,, },, ,,w 03 ,,uw ,, {,," " ,,x # newChild
. be w " newChild
isSupported(feature, version) x

", ,uw , eux}X {3" uw " eb]3 b


.J" ,,,,,,,,,,\ .,,,,,,,,,, be,,,,,,,,,, ,,,,,,,,,,w ,,,,,,,,,,
.> DOM .DOMImplementation.hasFeature()
normalize() x

e _e "uw } e} b * # _ " b  2# 1u|


, u,w " "3u, e,} du,b 3 _e - " eu e} dub
. be w d[ ._e 1u 

{Y` 3u ex ==A

removeChild(oldChild) x

,,uw oldChild . " e,, ,,w ,, {,," # " oldChild ,,b


. be w " oldChild .uw b  # d#
removeEventListener(type,

listener, x
useCapture)

DOM ., be, w d[ . be w " d 3"

. e eux}X O u 3 N M ""Y_ {} " >

replaceChild(newChild, oldChild) x
,b (,uw ,b , 2,# # ,uw ,_) oldChild ,b du w
,, {,," " ,,x # newChild ,,b . ",,be, " newChild
. be w " oldChild . e } w ex du # 03 uw

*u" ?>@N
DocumentFragment Document Comment Attr
.Text Element

Number

?>A

(= ECMA > {Y`e == } {Y` 3u)


.  dw eux}X

#u ?>A=
new Number(value)
Number(value)

d d" w " 3 new c  w Number() d#u


{, , ,\X ", 2 "3 ,w ,_ " d, , e, 3 _e x|
,w " , ,3 ,_ { ex| wu| ^ Number() new 23w . be w
. be w " " 2 3 _e x|

u{wu ?>A>
, }u, due } Number du{ u{wu 
.2 #

==B {Y` 3u

Number.MAX_VALUE x

.1.79E+308 u4 x| .u wu |K"w
Number.MIN_VALUE x

.5E-324 u4 x| .u wu |^[_
Number.NaN x

.d NaN 2u .d "


Number.NEGATIVE_INFINITY x

.{uew du "
Number.POSITIVE_INFINITY x

.d Infinity 2u .{uew "

u%3" ?>A?
toExponential(digits) x
digits 3 , ," ^ uw eu " w " d}" u

d,_ {  " 0 w 2" dw . be w d"u "


3 ,w ,uw digits ", . ,e u 2 w u 3 b
. ,e, u}, ,uw 1# " |  - b 3 uw >
.? ECMA NN {Y`e =N {Y` 3u
toFixed(digits) x

," digits ,| uw u4 eu " w " d}" u


d,w .,uw > 3 ,w ,uw digits ", ., b e, ,w d"u
u, 2 w u 3 b d_ {  " 0 w 2"
.? ECMA NN {Y`e =N {Y` 3u . e
toLocaleString() x

}," e, du,  " $u w _ " # eu d}" u


u} " d * u " 
4 . be w {
=N {Y`, 3u, .{, 2u,b" d_  3 d"u dw
.? ECMA NN {Y`e

{Y` 3u ex =>

toPrecision(precision) x
precision 0 u,, " e, ,," ,,| u,,w " ,, d},," u,,
, b ,w d}," .,uw >= 3 = w uw precision . be w

u}, eu, u, # u, 3 {,wu , u, # 2u,` ", "


,w u, 3 , b d_ {  " 0 w 2" dw ._e
ECMA NN {Y`,e, =N {Y` 3u . e u 2
.?

toString(radix) x

" },," ,, 3 ,,_ ,,x| },," ,,w ,,  du,,x " " ,,
du,x #  , -, b .uw ?O 3 > w uw radix . be w
. e u} =

*u" ?>AM
.Math

Object

?>B

(= ECMA = {Y`e = } {Y` 3u)


.{Y` 3u du d 3 $_

#u ?>B=
new Object();

2 ,w , du,{ |e _ _e u eu et #u 
._ u

u{ ?>B>
,uw , u, ,c[ ,` # , -, {Y` 3u du 1u|
.} # du{ d"
constructor x

.{,, ,,w e,, d#u,, ,,_ e}Y`,, 3u,, wu,,| ,,w d"u,,
.= ECMA > {Y`e == {Y` 3u

=>= {Y` 3u

u%3" ?>B?
,uw , u, ,c[ ,` # , -, {Y` 3u du 1u|
.} # du%3" d"
hasOwnProperty(propname) x
true ,uw }, , , 1u, u,w e3", e} e b
e, # " 2 u, 3 ,uw {, 2 ,u e, ,b u . be w
.,,,, be, ,, ,,,,w false ,,,,uw ,,,,w " ,,,,w ,,,, ,,,,
.? ECMA NN {Y`e =N {Y` 3u
isPrototypeOf(o) x
e, ^, o b u . be w true uw o e  b
.,, be,, ,,w false ,,ux 2 ,, e,, ,, u,, 3 ,,ux
.? ECMA NN {Y`e =N {Y` 3u
propertyIsEnumerable(propname) x

{," ,uw } 1u uw e w { ^ e b
e ,,w du,,{,, .,, be,, ,,w ,,  3 ,, be,, ,,w
.,,e, , ,,w for/in du,, " ,_ }, eu,{,
.? ECMA NN {Y`e =N {Y` 3u
toLocaleString() x

d#u, u,X " ., be, ,w " e,  d e d}" u


u,, ,,e,, ,, " toString() u4 ,, },," ,, ',,,,X
.,,, ,,,| " 2 d#u,,,e,,, d,,,w ,,,|e,,, u,,,$_,,,#
.? ECMA NN {Y`e =N {Y` 3u
toString() x

$_ " _ eX d#u uX . be w " e d}" u


u, w d u 2[ 3 { e e  s" Object
2 3 ,_e cu " %3" 
4 u$_# ` . e
.,, ,,s" d| ,, u,, , _ ,,_e, , | d,,b ,,w "
.= ECMA > {Y`e = {Y` 3u

{Y` 3u ex =>>

valueOf() x

,_ eu, " " . be w 3 " " " e d3w "


u, ., be, w " e u4 %3"  } Object * #
,w " , ,w (,w d3,w " ew 3 2\ eu$_#
.= ECMA > {Y`e == {Y` 3u . be

*u" ?>BM
.String Number Function Boolean Array

??

Option
(= d} { {Y` 3u)
.u} wu db ^
Element :# }

"}

??=

select.options[i]

#u ??>
u,w uX " w " b du 2|e 2 # w 3 == {Y` 3u "
: _ u Option() d#u # u}
new Option(text, value, defaultSelected, selected)

u{ ???
defaultSelected x

,b , #u " _e _ e}/e ew " ^


. u { u} Select #
index x

d,," " " ,,b ,, d"u,, ,,_ e,,-,, ,, ,,


. e 2u 2 d3u u} e options[]
selected x

, ,u 0u " _e _ e}/e ew " ^

=>? {Y` 3u

,b ^, 2, u,} e,"w d,w ., u, { u} b


2 w " 2  uw 3 w ._ u} {  # |e
, ,w e,}3 ,_ _ { .` w u _ u} " b |e
# X ,,,,3" ,,,, e,,,, ,,,,| " ,,,,,b u,,,,,} ",,,,,
. e   Select.onchange()
text x

. e  2u w"u_ dw b 2 w _ e}/e d}"


value x

1uc " b  2 u} " " _ e}/e d}"


. e  `x "3 w 1 2  |

*u" ??M
.Select

??=

RegExp
(? ECMA ? {Y`e => } {Y` 3u)
.c .ux dw v| du"ux

} "}

??==

/pattern/attributes

#u ??=>
new RegExp(pattern, attributes)

4 x _ e 2uw d\X "} # u} uw v| du"ux duc


. _ {x u d"uw " u}_  "

du du{ ??=?


global x

d" e, , ,_ ,_e _ e- ew " ^


. e 1u d " w " .ux  3 { g {

{Y` 3u ex =>M

ignoreCase x

d" e, , ,_ ,_e _ e- ew " ^


K",w 3 ^,[_ -3, w | 23w " .ux  3 { i {
. e 1u
lastIndex x
{, e},/e, {, , d RegExp du dw

d 3   e 2u " .ux  # w uw d
. be " e"w " dw .ux dw _ {

multiline x

d" e, , ,_ ,_e _ e- ew " ^


. e 1u d[ " w " .ux  3 { m {
source x

,,w " pattern v,,| "u,,x ,,x },, ,_ e,,-,, d},,"


. " e c " u{ 3 u_ du}

u%3" ??=M
exec(string) x

" .u,x u,} # d" 3  e .ux v| "ux  uw " }"


., be, ,w null , {,u eu,x Z, ,b u 3  be w
d3u,, ," d,,w ,,u .{,, ,,}u .u,,x "u,,x ," ,,
,x v,| "ux " du"ux# uw _ } eu}"#
, _ " , index {,, ^, ,, ,, bw d, " .,,,,
. be w " .ux *3 {
test(string) x
, ,uw v,| "ux  uw .ux wu } d3u string b

. b3  be w

*u" ??=N
String.replace() String.match()

=>N {Y` 3u

.String.search()

??>

Screen
(=> d} { {Y` 3u)
.u d d"uw " u

"}

??>=

screen

u{ ??>>
availHeight x

.`X v w dw
availWidth x

.`X v w duX
colorDepth x

.u d `Xw{w | u 3 b"3 a"x du"I


height x

.`X v w e_ dw
width x

.`X v w e_ duX

*u" ??>?
.Navigator

Select
(= d} { {Y`e)
e`b u} { ^
Element :# }

???

{Y` 3u ex =>O

"}

???=

form.elements[i]
form.elements[element_name]
form.element_name

u{ ???>
<select> d,bw du,{ # 1_ dw { ^ u} e
,w 3, . " size 3 name multiple disabled x # HTML "

:{ _ | " # du{ 


form x

.e- .{ u} e  d3u _ e e


length x

d," , du, ,| ,_ e,-, , ^


u,,,w ,,,ww {,,, , , ",,, .,,,_e, , ,,, " options[]
.{ options.length
options[] x

" , dub # e` - 1_ _ b du # d"


,,,,w d,,,,}_ ",,,, 2  u,,,,w ,,,|e,,, .{,,,, u,,,,} e,,,
", 2  u,w e,}) ,_ |u|_ " "  options.length
,w null ", 2  u,w .(," w " 2 dub 1u| |e
, ," ,w " 2 w (w db |e " u # e`
^ " " 3 _e u w u " 2 # w dub dw "u_
^, Option() d#u, # u}, u,w ,|e, .,_e, ,|u|_
,,,,,,,,,,w " 2 3 ,,,,,,,,,,_ u,,,,,,,,,, ,,,,,,,,,, d,,,,,,,,,,b
v,|| , ,w 3  &u} options[options.length]
._ u ub du} w b ^
selectedIndex x

" " u} db d"u _ e}/e ^


", ,uw , u,} db Z b . e 2u u} e
,,uw ,, u,,} ,,b ^, # , w ,,b .{,, 1 {,, , 
2u, " , u,} db 3 d"u selectedIndex

=>@ {Y` 3u

# ,c du,,b 1u,|   d" {  w b . e


{,u # ub 1u|  1 " b .e "u u} {u
.e "u u}
type x

b ._e " * _ e- d}" { ^


,| " e,) ,w " b ^ u} d#u u} e
{, , ", (,uw , ,_! multiple { 2 HTML
"select- 2 ", ", , " .{ "select-one"
.Input.type .J" ,,,,,,,,,,,,\ .{,,,,,,,,,,,,, multiple"
.== {Y` 3u

u%3" ????
add(new, old) x

d,,," " old d,,,b # ,,,x {,,," " new d,,,b e,,,
db uw } null " old b ._e " options[]
.= DOM . be w d[ . e u " du} w new
blur() x

. be w d[ 3 e | " _ 2u_
focus() x

. be w d[ 3 be "u} " " _ 2u_


remove(n) x
., be, ,w d,[ . " e w " options[] d" 18-n
.= DOM

u# X 3" ???M


onblur x

. e    3"e { # d 3"3 2u_ e}3


onchange x

"u u} {u # u _e u} " 1 # e` w"u_ e}3

{Y` 3u ex =>A

. e   _e
onfocus x

. e   e { w d 3"3 2u_ e}3

*u" ???N
.Option Input Form

String

??M

(= ECMA = {Y`e = } {Y` 3u)


.u}" uw "u_
Element:# }

#u ??M=
String(s)
new String(s)

,x| }," ^, ,w " , ,3 String() wu,| new ,c 23w


^ " "  " _ { d#u String() new c uw ._e
. e " }" e

u{ ??M>
length x

.e- .}" " u |

u%3" ??M?
charAt(n) x

. be w " }" " n { " d


charCodeAt(n) x

., be, ,w " }," " n {, " , d, ,` "


.= ECMA NN {Y`e => {Y` 3u

=>B {Y` 3u

concat(value, ...) x

,w u,3 # ^, , 2 ,_ x| # _  be w d d}"
=> {Y`, 3u, .,e, {, ,w ,u du}" 1u  3 }"
.? ECMA ? {Y`e
indexOf(substring, start) x
w start du # " }"  " substring " 3 {
,b ., be, ,w 1 ",  , {,u ,b 3 , be, ,w w
. e " 2 "  - start
lastIndexOf(substring, start) x
start d,u u,| " }"  " substring "  {
start ,b ., be, ,w 1 "  {u b 3  be w

. e " }" 0 ww 2 "  -

match(regexp) x

`,} d," 3 _e u  v| "ux uw " }" 


,uw , {,u eu,x ,c\ b 3  be w .ux u} #
,ux d, v,| "ux ^ regexp b . b e w null
%3" ,,,u 2u,,, ,,, ,,, b ,,,w d,,," ",,, 2 "
{, e,) ,uw d regexp b .{ RegExp.exec()
du,.u,x } d3u  b w d" u (uw } "g"
.? ECMA ? {Y`e => {Y` 3u .{ {u
replace(regexp, replacement) x

u,w regexp u,w , ,x } 2 " _  be w d d}"


^, {,, , ` regexp .{,, ,, cu,, replacement
{ ` replacement .uw u d}" ^ u 3 v| "ux
#) v,| "u,x d"u,} ,b du, d3u _ uw }" ^
cu, , ,x }, # eu,{ d3 w _ uw ($1 x
$u, ,w " cu d}" _ uw ewu| |e  " .e
=> {Y`, 3u ._e xu u3 "  .ux us
.? ECMA ? {Y`e

{Y` 3u ex =?

search(regexp) x

,,x regexp u,,w ,_ " },," , d},,"# ,3 *3,, {,


., be, ,w 1  , {,u eux b u 3  be w  e
.? ECMA ? {Y`e => {Y` 3u
slice(start, end) x

# }," , du,, 1u,| d3u _  be w " d d}"


.{, (2 23w u) end d"u u| (2 u) start d"u
,w e du3 .wue   }" 2uuX u|  - end b
=> {Y`, ,, 3u,,,, .},,,, },,,," ,,,, # %"u,,,, du,,,,
.? ECMA ? {Y`e
split(delimiter, limit) x

`,| }," },` , " # ,_ , be, ,w u,}," # d"


. ,e delimiter d3 w }" du  e
,b .,uw v,| "u,x ^, u }" ^ { ` delimiter
} uw }X 23" " e|"ux# uw v| "ux ^ delimiter
ub  b w d" " "ux# uw x d_ 
== {Y`,, 3u,,, .Array.join() .J" ,,\ . ,,,e,,
.= ECMA ? {Y`e
substring(from, to) x

, to 1 u,| from d"u, du, # `} d d}"


,  }," , u,| },"#  , -, to ,b . be w }"
.} #u e du3 .wue
substr(start, length) x
, from d"u # length | # `} d d}"
}," , u,| },"#  , -, length b  be w }"

wu,,| ,, ? {Y`,,e,, => {Y`,, 3u,, .,,wue,, ,, 


u,,, slice() # 2 du,,, ,,,w {,,, ,,,}w 3 {,,, "u},,,
._ u} substring()
toLowerCase() x

-3, 1u,| 2 " ,_ , be, ,w " }"  # dc d

=?= {Y` 3u

,x| , 0 u, ^,[_ -, ,w 2 ,w " " K"w


.
toUpperCase() x

-3, 1u,| 2 " ,_ , be, ,w " }"  # dc d


,x| , 0 u, K",w -, ,w 2 ,w " " ^[_
.

u} w| ??MM


String.fromCharCode(c1, c2, ...) x

,  du," u,w eu,, # ,_ , be, ,w d d}"


.= ECMA ? {Y`e => {Y` 3u .{ `|

??N

Style
(M ""Y_ {} > DOM)
. ^ } CSS du{

"}

??N=

element.style

u{ ??N>
| CSS { d# w e : " d u# du{ e
u,w { { 1u 0 u { 1u . " 0 u { ^ CSS2 du| "
.{, 1# {Y`, 3u " d"} duu # u} dw _ e|| }
" font-family ,u }, ,u , d3u, ,_ d_[ du{
# 1,_ , 03 d,_ # ,w 3 e } u 23w {Y` 3u
u, # 3, ,w .fontFamily :e *3 K"w -3 uw dw u_
,w , {, , ,! d,_ ^, {Y`, 3u, " float { 1u _
. e u} cssFloat # 2 {Y` 3u
,_ u,, # .,,,,  2u,, , # 03,, " CSS d,,w du,,{,,
, u, " 1,_ dw  } CSS du{ uw u} u4 } u{
^ w { eu u 3 u # * dw . e s" dub

{Y` 3u ex =?>

" u,,{,, ,  d, e, du,,b"3 , _ , _ {,, ., _ ,, CSS


._e d#u uX
d , u, _ eu{ uw 2 _ "u_ " 3 d}" u{ 1u|
parseFloat() # ,uw u,{,  " }b dw . _ { uw "
u,{, ,c ,w e " dw ._ u} w }" 2 _ x| dw
1u, 2 ,3 2 3, u,w " "u,_ ,
4 , _ _ x| }" w " uw
."px" u  e
background
backgroundAttachment
backgroundColor
backgroundImage
backgroundPosition
backgroundRepeat
border
borderBottom
borderBottomColor
borderBottomStyle
borderBottomWidth
borderCollapse
borderColor
borderLeft
borderLeftColor
borderLeftStyle
borderLeftWidth
borderRight
borderRightColor
borderRightStyle
borderRightWidth
borderSpacing
borderStyle
borderTop
borderTopColor
borderTopStyle
borderTopWidth
borderWidth
bottom
captionSide
clear
clip
color
content

counterIncrement
counterReset
cssFloat
cursor
direction
display
emptyCells
font
fontFamily
fontSize
fontSizeAdjust
fontStretch
fontStyle
fontVariant
fontWeight
height
left
letterSpacing
lineHeight
listStyle
listStyleImage
listStylePosition
listStyleType
margin
marginBottom
marginLeft
marginRight
marginTop
markerOffset
marks
maxHeight
maxWidth
minHeight
minWidth

orphans
outline
outlineColor
outlineStyle
outlineWidth
overflow
padding
paddingBottom
paddingLeft
paddingRight
paddingTop
page
pageBreakAfter
pageBreakBefore
pageBreakInside
position
quotes
right
size
tableLayout
textAlign
textDecoration
textIndent
textShadow
textTransform
top
unicodeBidi
verticalAlign
visibility
whiteSpace
widows
width
wordSpacing
zIndex

Text
(= DOM)

??O

=?? {Y` 3u

. ^ " } # d
Node :# }

 ??O=
, {," ^ " d"bu 23w u } # d - } e
u,w ,_ HTML " d,^, }, d 3"3 uw ux "  }x .{ DOM
._ ux}  e  2u Input e

u{ ??O>
data x

.b  " e} d}"
length x

.e- .b  " du |

u%3" ??O?
appendData(text) x

d,,[ 3 ,,_e,, u,, ,,b ,, },, ,, ,,w " ,,  },,
. be w
deleteData(offset, count) x

, count ,| ,w offset d"u, d # " b  }


. be w d[ ._e -
insertData(offset, text) x
u, ,b , }, ,w offset d { " "  }

. be w d[ ._e
replaceData(offset, count, text) x
u,w , count | w offset d"u d # " b  }

. be w d[ ._e cu  }
splitText(offset) x

,_e x| b 3 w offset { d " " e} b 

{Y` 3u ex =?M

" 2 3 ,,_e, u,, ,, ,,w e,, ,,b # ,,w " , ,,b 3


. be w
substringData(offset, count) x

,w w offset d"u d #  count # `} d}"


. be w

*u" ??OM
.Node.normalize()

??@

Textarea
(= d} { {Y` 3u)
.d[ } d 3"3
Element :# }

"}

??@=

form.elements[i]
form.elements[name]
form.name

 ??@>
.{ (d 3"3) Input e x e (e} du) Textarea e

u{ ??@?
d, bw du,,{,, # ^, , d,,w " eu,,{,, Textarea e,
disabled defaultValue cols ,,,,x # HTML " <textarea>
" # du{  w 3 ._e | rows 3 readOnly name
:_e |
form x

.e- .{ Textarea e  d3u _ e e


type x

", " ,_e, , " * _ e- { ^

=?N {Y` 3u

.{ "textarea" " 2 " Textarea e


value x

" e,} d,u , , , },, ,_ e},,/e, d},"


{,,,, ",,,, 2u,,,, 2 d,,,3 ",,,, .,,,,_e,,, ,,,,
.{ defaultValue

u%3" ??@M
blur() x

. be w d[ 3  | " _ 2u_
focus() x

. be w d[ 3 }b | " _ 2u_
select() x

. be w d[ ._e u} " e} du d} _

u# X 3" ??@N


onblur x

. e    3"e { # _ 2u_ e}3


onchange x

,w " _ 2u_ 3   | " e} du d} w"u_ e}3


, # X ,3" , . ,e, , _e } dc du
" e} du  } 3 "u_ w"u_ _ e   e}3
. xw 2uuX w
onfocus x

. e    e u _ 2u_ e}3

*u" ??@O
.Input Form Element

{Y` 3u ex =?O

??A

Window
(= d} { {Y` 3u)
.b"3 " u_ u X

"}

??A=

self
window
window.frames[i]

u{ ??A>
,Xu0u,} du,{, .,_e, ,| " ,# du,{ X e
,_ ,_ { . { ub " w {  # w b"3 }
,w uw  e  d e d} { {Y` 3u " X e
.{  _! d e dw _ eu{ 3 X e 
closed x

{, }w X _e _ e- ew " ^


. u
defaultStatus x

,c 1u,X 2 ,x " " _ " euX _ e}/e d}"


._e |  e  u b"3 {3 "
document x

.J" ." u,_ u, ,X  " e w e- d"u


.Document
frames[] x

,X , " , du," u_ -, ,_ ,X du # d"


,,w },, {,, ,` 1,_ ,, u,," u_ , ,_ ,_ {,, .{,,
, frames[] d," , # ,_ ,uw 23" " eu" u_
.{ ewu} wu u # 1_
history x

.J" ." u_ u X  w (w dwu e w e- d"u

=?@ {Y` 3u

.History
length x

., e, 2u, " " u,_ u, ,X , , " du" u_ |


.{ frames.length 0 u
location x

{,  .Location .J" ." u_ u X  w (w 2u` e


2 ,b"3 ,w 2 ,w " eu, ^, d}" b : " ]3 d"u}"
. e u 3 e " eu
name x

%3" ,, # 1u,, .{,, " u,,_ u,, ,,X 1u,, d3u,, ,,_ d},,"
<frame> d, ,bw " name {,,, u,,,w u, , 3 Window.open()
" e,,,-,,, = {Y`,,, 3u,,, " . ,,,e,,, ,,,
.e}/e == {Y` 3u
navigator x

3 {,3" w (w u _ b"3 e w e- d"u


.Navigator .J" . e 2u " `x b"3 dw`X
opener x

,_ #u,w " ,X , ,_ d,X e, w e}/e d"u


.== {Y` 3u .{
parent x

" u,_ u, ,X , d3u, ,_ dX e w e- d"u


2 , ,w parent uw uw dX ^ X  b .{
._e "u
screen x

d"u,w " " e|u _ u d e w e- d"u


., e, 2u,  e  u 2 " b"3 _ eu d
.=> {Y` 3u .Screen .J"

{Y` 3u ex =?A

self x

{,, u,,w - ,,} ,  .,,X ,  ,, ,,w e,,-,, d"u,,


.{ window
status x

, " ",b eu,X u, dw 2|e _ e}/e d}"


. _ u} 2 # b"3 {3
top x

.{ X  d3u _ euw dX w e- d"u


"u, 2 , ,w top ,uw u,w , d,X ^, ,X  b
._e
window x

 w d"u d3u { self { uw - } window {


.{ X

M W`{ du{ ??A?


innerHeight, innerWidth x

" , u, d,u du,X 3 ,w _ e}/e eu{


,w },  u,w , .,_e, , ,`X v w " X 
.{ 2 0u 3 "w 3 " dw
outerHeight, outerWidth x

, " X  duX 3 w _ _ e}/e eu{


.{ 2 0u 3 "w 3 " dw w }  uw  ._e
pageXOffset, pageYOffset x

,w , d "77 du `X | _ e- 
. e 2u " (pageYOffset) uX 3 (pageXOffset) {"
screenX, screenY x

W,[ 3 u,w d,b Y 3 X u,} ,_ e,- 


" u_ ^ X  b . e 2u u d w {x " X
2 " " u_  _ " euw dX u} u{  uw

=?B {Y` 3u

. e 2u { 3

M ""Y_ {} du{ ??AM


clientInformation x
navigator {, - ,} ""Y,_ {,} } { 

. " "u b"3 e w 3 {


event x

" d ,3" |, u,s _ { 3" e ^ { 


{,} ,3" 0, " ., e, 2u {  " X  " _
,`w  e  # X 3" w 3 2 w 3" e ""Y_
. e  &u} {  w

u%3" ??AN
e, _ u #  " .{ " " # X0u} du%3" X e
du%3"   3"e "u w d e d} { {Y` 3u " X
.{ " " d e dw _!
alert(message) x
d,[ .,, e, 2u,, ,,c}b d,,X ^, " " message d},,"

.= {Y` 3u . be w

blur() x

.,,, be,, ,,,w d,,[ .,,, e,, ,,| " ,,_,,, 2u,,_
.== {Y` 3u
clearInterval(intervalId) x

.,_e, " intervalId du uw d"`| d


.=> {Y` 3u . be w d[ .setInterval() .J"
clearTimeout(timeoutId) x
.J" .,_e, " timeoutId du uw "u} 2u#
.= {Y` 3u . be w d[ .setTimeout()

{Y` 3u ex =M

close() x

.= {Y` 3u . be w d[ 3 we " X


confirm(question) x

^, } 3  e 2u c}b dX ^ " " question }


true ,,w " OK d, _ w"u, _ ,,b . ,,e, ,, u, d" ,,
, be, ,w false ,w " Cancel d_ b 3  b e w
.= {Y` 3u
focus() x

%3" , u`, _ "  " _e uu| " _ 2u_


d[ .uw c duX d w " dX _ e ~uw
.== {Y` 3u . be w
getComputedStyle(elt) x

du,, 1u,| d3u, _  be w e- d e ^


du,{ .{ elt w (w (} du 3) CSS
`X v w u " width 3 top left u {
.> DOM . e  b w
moveBy(dx, dy) x

d,[ .,_e, u w u 2 w e { # " X


.=> {Y` 3u . be w
moveTo(x, y) x

., be, ,w d,[ .,_e } { w " X


.=> {Y` 3u
open(url, name, features) x
1u, 3 b . e 2u 1u uw dX " " url eu

d, d,X ,uw } 3 1u 2 uw dX u 3 -


3 #, ,_ {, d}," features d"u,} ,3 . e u
, 0,b3 u,w , , e}, " w " dX u|
,e, eux},X u`, d u4 " _ eu eb]3 1u ._e
location height=pixels width=pixels :# ,"ux

=M= {Y` 3u

{,,,,,,,,} " .toolbar 3 status resizable menubar


,, top=y 3 left=x ",, ,,w ,,X {,, ""Y,,_
screenY=y 3 screenX=x # 2 du, ,w W`{ " . e
.,, be,, ,,w " ,, u,, ,, d,,X e,, .,,_ u},,
.= {Y` 3u
print() x

3 ,_e, , ,b"3 d,X Gu[ d_ 2 _ ^_ u


.N ""Y_ {} M W`{ . be w d[
prompt(message, default) x

,,} 3 ,, e, 2u,, ,,c}b d,,X ^, " " message 1u,,X


w " default d"u} " ._ "3 " uX } w"u_ _ e
" w"u,_ ,| , "3 d}," ., e 2u 'X uX 2
eu, d}," ^, ,` "3 d}," w"u,_ ,b u, 3  be w
null ,w " -, d_ w"u_ _ e|" " 3  b e w
.= {Y` 3u . be w
resizeBy(dw, dh) x

d,,[ 3 ,, e,, #,, ,,| ,, ,, 2,, ,,w " ,,X


.=> {Y` 3u . be w
resizeTo(width, height) x

., be, ,w d,[ 3 u,"e, , , d# w " X


.=> {Y` 3u
scroll(x, y) x

d,,[ 3 ,,_e,, 03`,, ,, ,, u,,} ,,w " ,,X


,, ,,w => {Y`,  3u,, " .== {Y`,  3u,, .,, be, ,,w
.{  scrollTo()
scrollBy(dx, dy) x

., be, w d[ 3 _e 03` 2 w " X


.=> {Y` 3u

{Y` 3u ex =M>

scrollTo(x, y) x

d,,[ 3 ,,,_e,, 03`,, ,,, ,,, {,, ,,,w " ,,,X


.=> {Y` 3u . be w
setInterval(code, interval, args...) x
ewu,#" ,ue interval " code {Y` 3u } d}"
du, ,w |e code N ""Y_ {} 3 M W`{ " ._e

, wu| {u 2 " .uw wu| ^ w d"u }" ^


,b , W`,{, " . ,e,  "uw ^ ue interval
,w e, , " ,uw }, ,3 interval # ,w d3
d,3 ,w e,b]3 , e,3  ,e,  "_, wu| w 3 2
2,|e, _  be w u ^ . e eux}X ""Y_ {}
%3" ,,,,w ,,,,3 2,,,, ,,,,w " 2 d",,,`| d,,,, ,,,, d,,,,w
.=> {Y` 3u .  clearInterval()

setTimeout(code, delay) x
delay 2,, dY,, # ,,X " code {Y`,, 3u,, },, d},,"
code N ""Y,_ {} 3 M W`{ " ._e ewu#" u e

,w (,w ~w w uw wu| ^ w d"u }" ^ du w |e


2,| e _  b e w u ^ ._  setInterval()
%3" ,,,,w ,,,,3 2,,,, ,,,,w " 2 e, ,,| d,,,, ,,,, d,,,,w
,,w ,,uw %3" ,, ,,_ ,,_ {,, .  clearTimeout()
. ,e, delay 2u,# 2, dY, ,} }b w dw 3  be
.= {Y` 3u

u# X 3" ??AO


, <body> d,bw du,{, d,3 w X e du# X 3"
.e |
onblur x

, , , e, {, # " ,_, 2u,_ ,X ,_ eu#


. e

=M? {Y` 3u

onerror x

, . ,e, ,  _e #3w {Y` 3u du ^ e}3


u, 1u,X : ,e   3 uw _ { d]3 # X 3"
.2 w " " u d"u 3 u d3u eu
onfocus x

, ,  "3e, {, ,w " ,_, 2u,_ ,X _ eu#


. e
onload x

, , , , ,u_ ", ,w (" u_ d u) e}3


. e
onresize x

. e   _e | X d# e}3


onunload x

. e   _e J| " e b"3 e}3

*u" ??A@
.Document

{Y` 3u ex =MM

applet
clause
Boolean
infinity
response
bold
query
file
extension
stack
hidden
dynamic
implementation
preload
default
configuration
pixel
link
function
parse
parser
submit
compile
compiler
recursion
recursive
z-order
decorations
image
suspended
specification
modifier

^uw
w
ew
{uew
uX
a"X
X
3X
X
}X
2uX
uX
d#u uX
eX
'X
dw`X
`X
X
wu|
|
b|
|
3|
b3|
|
e|
z v||
u|
|
e|
u|
b|

uI3

ec w e"u

M=

hypertext
execute
assignment
format
array
associated array
exception
script
scripting
reference
pointer
bug
validation
declaration
initialization
increment
security
select
propagation
portable
non-portable
match
argument
load
body
primitive
sibling
label
enumeration
enumerable
reset
tag

}w

&u}
"
"
eux|" d"
u}
{Y`
e{Y`
"u
b"u
0u`
e"ux}
1
%#u

{
u}
"u}
X0u}
Xu0u}
.ux
3
2 "uw
w
d3w
/" w
v[w
d"uw
e w
2 bw
bw

=MN uI3
event
event handler
event listener
runtime
timer
substring
underflow
subclass
history
constructor
global
overflow
carriage return
header
prototype
top-level
line feed
status line
platform
escape sequence
document
operating system
hexadecimal
ID
identifier
object
object-oriented
style
attribute
form feed
screen
visibility
user agent
expression
regular expression
integer
non-identity
operator
operand
public
element
caption
hyphen

3"
# X 3"
3"
 2u#
2u#
}"#
"#
$_#
wu
#u
d
"

uw

{3
`
b d

u }
euc u
u
u
e
be

{
d
u d
"
w"u_ u
"ux
v| "ux

eu` 1
c

2
u

immutable
interpret
interpreter
request
comment
constant
register
plug-in
client-side
JavaScript
core JavaScript
thousands separator
stream
palette
tab
popup
checkbox
cache
loop
property
private
error
embed
sibling
scrolling
entry
insert
tree
command
syntax
instruction
button
radio button
double-click
interface
relational
string
string
digit
encoding
rollover
version
method

Xu|
|
b|
uu|
|
{wu
2 _ {x
2#u
{ {Y` 3u
d}
} {Y` 3u
2ub" d_ 
2u
a"x

e
_uw^[
2u du

{
e
u
2uw
" w/
2 " "
"
2 _ "
{"
"}
"}
"}
_
e " d_
^_3
w"
dw"
}"
}"
"
d"b"
d#3"
{3"
%3"

{Y` 3u ex =MO


visible
browser
navigator
path
client
location
decimal point
floating-point
deprecated
time zone
inherited
mouse
position
shortcut
clipping region
textarea
hidden
navigation
copy
copy
cursor
markup
URL
quote
exponent
symbol
index
indexing
exponential
instance
address bar
scrollbar
character set
charset
character
parent
input
resolution
version
semicolon
identity

es
b"3
b"3

d}
2u`
d"u
"3u

eu# d
e3"
"
{
xu
%w du
e} du
esu
dw3u

d" w
cu
d"bu
eu
0
u
u
u
e u
eu

eu "
uX"
2uc
2uc

3
d 3"3
3
{3
0b3
eu`

calling
upload
child
download
space
white space
backspace
read-only
context
curly brace
domain
frame
focus
decrement
slash
backslash
bound
keyword
click
capture
node
option
container
pattern
layer
wrapping
literal
nickname
anchor
source
radix
variable
variable
source code
plain text
finite
frame set
local
localized
coordinate
document object
model

e
d"b
#
d"b3
u
du
23"3 du
e-


3
" u_
2u_
u_
_
23"3 _
2_
I3_
^_
( 3") }b
b
b
ub
c

u
e
v
c
x
ux
}
}
uw }
u }
eu}
" u_ d
e
e
}
e 0

=M@ uI3

e"u w ec
container
context
coordinate
copy
copy
core JavaScript
curly brace
cursor
decimal point
declaration
decorations
decrement
default
deprecated
digit
document
document object
model
domain
double-click
download
dynamic
element
embed
encoding
entry
enumerable
enumeration
error
escape sequence
event
event handler
event listener
exception
execute
exponent
exponential
expression
extension
file

ub

d" w
} {Y` 3u

cu
d"u
1
u|
u_
'X

"

e 0
3
^_3
d"b3
uX

2uw
d"b"
"
e w
d"uw
u
b d
3"
# X 3"
3"
u}

u
eu
"ux
X
3X

address bar
anchor
applet
argument
array
assignment
associated array
attribute
backslash
backspace
body
bold
Boolean
bound
browser
bug
button
cache
calling
caption
capture
carriage return
character
character set
charset
checkbox
child
clause
click
client
client-side
JavaScript
clipping region
command
comment
compile
compiler
configuration
constant
constructor

M>

eu "
c
^uw
3
"
&u}
eux|" d"
{
23"3 _
23"3 du
w
a"X
ew
2_
b"3
0u`
_
2u du
e
2
( 3") }b

2uc
2uc
_uw^[
#
w
^_
d}
{ {Y` 3u
d}
%w du
"}
|
3|
b3|
dw`X
{wu
#u

{Y` 3u ex =MA


local
localized
location
loop
markup
match
method
modifier
mouse
navigation
navigator
nickname
node
non-identity
non-portable
object
object-oriented
operand
operating system
operator
option
overflow
palette
parent
parse
parser
path
pattern
pixel
plain text
platform
plug-in
pointer
popup
portable
position
preload
primitive
private
propagation
property
prototype
public

e
e
2u`

d"bu
.ux
%3"
b|
"
dw3u
b"3
v
b
eu` 1
Xu0u}
e
be

u }
c
b
"
a"x
3
|
b|

c
`X
u }
`
2#u
b"u
e
X0u}
{
eX
d3w
e
"u}
{

finite
floating-point
focus
form feed
format
frame
frame set
function
global
header
hexadecimal
hidden
hidden
history
hypertext
hyphen
ID
identifier
identity
image
immutable
implementation
increment
index
indexing
infinity
inherited
initialization
input
insert
instance
instruction
integer
interface
interpret
interpreter
keyword
label
layer
line feed
link
literal
load

eu}
"3u
2u_
d
"
" u_
" u_ d
wu|
d

euc u
2uX
esu
wu
}w
u
u
u
eu`
|
Xu|
d#u uX

u
e u
{uew
e3"
%#u
d 3"3
2 _ "

"}

w"
|
b|
I3_
v[w


X
e
2 "uw

=MB uI3
status line
stream
string
string
style
subclass
submit
substring
suspended
symbol
syntax
tab
tag
textarea
thousands separator
time zone
timer
top-level
tree
underflow
upload
URL
user agent
validation
variable
variable
version
version
visibility
visible
white space
wrapping
z-order

{3
2u
}"
}"

$_#
|
}"#
e|
u
"}

bw
e} du
2ub" d_ 
eu# d
2u#
uw
{"
"#
d"b
eu
w"u_ u
e"ux}
}
}
{3"
{3
"
es
du
u
z v||

query
quote
radio button
radix
read-only
recursion
recursive
reference
register
regular expression
relational
request
reset
resolution
response
rollover
runtime
screen
script
scripting
scrollbar
scrolling
security
select
semicolon
shortcut
sibling
sibling
slash
source
source code
space
specification
stack

X
0
e " d_
ux
e-
|
e|
"u
2 _ {x
v| "ux
dw"
uu|
2 bw
3
uX
d#3"
 2u#
u d
{Y`
e{Y`
uX"
2 " "
{
u}
0b3
xu
/" w
" w/
_
x
uw }
u
u|
}X