




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 1 of 47
Topic: Intro to JavaScript
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 2 of 47
With a little luck at the conclusion of this lecture, we should be able to:
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 3 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 4 of 47
Interpreter Block Diagram
Compiled Code Block Diagram
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 5 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 6 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 7 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 9 of 47
/ This is a block comment. It is surrounded by the slash/asterisk and asterisk/slash that indicate the beginning and ending of a comment respectively. A block comment may span multiple lines. /
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 11 of 47
// This is an end of line comment. // Everything from the double // slashes to the end of the line // is ignored. // To use this method over // multiple lines, each line must // have its own set of double // slashes.
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 12 of 47
while(condition) { // statements to execute }
while(temperature > 72) air_conditioner_value = On; CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 20 of 47
for ( initialization ; terminating condition ; operation ) { // statements to execute }
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 21 of 47
http://www.devguru.com/technologies/javascript/11470.asp http://www.hscripts.com/tutorials/javascript/switch-case.php http://www.javascriptkit.com/javatutors/primer1.shtml
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 22 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 23 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 24 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 25 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 26 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 27 of 47
-! Returns true if its operand is zero or false
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 29 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 30 of 47
\n newline \t tab \r carriage return \ backslash " double quote ' single quote
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 37 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 38 of 47
link text
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 39 of 47
JavaScript provides access to a number of different components on the client’s side:
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 40 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 41 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 42 of 47
Window object
History object
Location object
Navigator object
Screen object
Document object
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 43 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 44 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 45 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 46 of 47
CSCI 2910 – Client/Server-Side Programming Introduction to JavaScript – Page 47 of 47
html
head body title h1 p
bob jim