0% found this document useful (0 votes)
17 views23 pages

CH 04

Uploaded by

Bharani ISE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views23 pages

CH 04

Uploaded by

Bharani ISE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Chapter 4

The Basics of Javascript

Programming the World Wide Web


Fourth edition
By Robert W. Sebesta

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley


Table 4.1 JavaScript reserved words

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-2


Figure 4.1 Primitives and objects

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-3


Table 4.2 Precedence and associativity
of the numeric operators

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-4


Table 4.3 Properties of Number

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-5


Table 4.4 String methods

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-6


Table 4.5 Methods for the Date object

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-7


Figure 4.2 An example of the output of
document.write

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-8


Figure 4.3 An example of the output of
alert

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-9


Figure 4.4 An example of the output
of confirm

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-10


Figure 4.5 An example of the output of
prompt

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-11


Table 4.6 Relational operators

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-12


Table 4.7 Operator precedence and
associativity

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-13


Figure 4.6 Dialog box from borders2.js

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-14


Figure 4.7 Display of borders2.js

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-15


Figure 4.8 Display of date.js

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-16


Figure 4.9 Display of
nested_arrays.js

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-17


Figure 4.10 Display of params.js

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-18


Figure 4.11 Display of medians.js

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-19


Table 4.8 Predefined character classes

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-20


Figure 4.12 Display of
forms_check.js

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-21


Figure 4.13 Display of debugdemo.js
with Internet Explorer 7

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-22


Figure 4.14 Display of the FireFox 2
error console

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 4-23

You might also like