Hello
Note: This code does not work in IE 7, due to a security related bug. The default behavior can be changed in Tools > Internet Options > Security > enable 'allow websites to prompt for information using scripted windows'.
Explanations:
- Look at the file's content source: IE: Use menu "Page-View Source", Firefox: Use "Menu View->PageSource"
- This example demonstrates how to use the built-in JavaScript prompt, confirm and alert functions in order to display small popups
- It also introduced to important programming concepts: variables and conditionals
- Finally, it shows again how to modify the content of an HTML element with the help of the "innerHTML" DOM method.
Exercise:
- Please edit the associated JavaScript file to change the contents of the questions asked.