




























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!





























(^) adding dynamic features to Web pages ◦ (^) validation of form data (probably the most commonly used application) ◦ (^) image rollovers ◦ (^) time-sensitive or random page elements ◦ (^) handling cookies ◦ (^) utilize buttons, text boxes, clickable images, prompts, etc (^) limitations of client-side scripting (^) since script code is embedded in the page, it is viewable to the world (^) for security reasons, scripts are limited in what they can do (^) e.g., can't access the client's hard drive (^) since they are designed to run on any machine platform, scripts do not contain platform specific commands (^) script languages are not full-featured (^) e.g., JavaScript objects are very crude, not good for large project development
Javascript Internal Script
String : "foo" 'how do you do?' "I said 'hi'." Number : 12 3.14159 1.5E Boolean : true false (Null, Undefined have special meaning in JavaScipt)
◦ (^) message = "howdy"; ◦ (^) pi = 3.14159; (^) variable names are sequences of letters, digits, and underscores that start with a letter or an underscore (^) variables names are case-sensitive (^) you don't have to declare variables, will be created the first time used, but it’s better if you use var statements (because of scoping issues) (^) var message, pi=3.14159; (^) variables are loosely typed, can be assigned different types of values (Danger!)
Set the variable to different value and then try...
Set the variable to different value and then try...
(^) (^) (^) (^) (^)
Set the variable to different value and then try...
Set the variable to different value and then try...
Set the variable to different value and then
Output: Entering the loop (^2) (^3) (^4) (^6) (^7) (^8) (^9) (^10) (^) Exiting the loop!