

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to javascript, a browser scripting language similar to java. It covers the history, uses, and basic syntax of javascript. The document also demonstrates how to create a confirm box using javascript and explains advanced uses such as manipulating the document object model (dom) and asynchronous javascript and xml (ajax).
Typology: Assignments
1 / 3
This page cannot be seen from the preview
Don't miss anything!


The BROWSER scripting language. Similar syntax to java. History: Netscape created to allow dynamic web pages. Uses: Many, here are a couple: verifying and reacting to user input, updating page without making user wait Javascript tutorial: http://www.w3schools.com/js/js_intro.asp Alert box sample: http://www.w3schools.com/js/tryit.asp?filename=tryjs_confirm
Can also put javascript in a file external to the html:
confirm.js: function disp_confirm() { var r=confirm("Press a button"); if (r==true) { document.write("You pressed OK!"); } else { document.write("You pressed Cancel!"); } } See sample at http://www.cs.usfca.edu/~wolber/jsSamples/confirm2.html