eg-259:lecture9
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
eg-259:lecture9 [2013/02/20 16:57] – [DOM 2 Example] eechris | eg-259:lecture9 [2013/02/26 08:33] (current) – [Previous Example] eechris | ||
---|---|---|---|
Line 58: | Line 58: | ||
* What purpose does the // | * What purpose does the // | ||
+ | ===== Previous Example ===== | ||
+ | Used HTML event attributes | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
===== Handling Events from Button Elements (more) ===== | ===== Handling Events from Button Elements (more) ===== | ||
Line 677: | Line 681: | ||
===== DOM 2 Example ===== | ===== DOM 2 Example ===== | ||
- | * A revision of // | + | * A revision of // |
+ | * Note that this doesn' | ||
+ | * A solution for this is left as an exercise. | ||
---- | ---- | ||
Line 761: | Line 767: | ||
* The '' | * The '' | ||
* The '' | * The '' | ||
- | * Example: [[/ | + | * Example: [[http:// |
---- | ---- | ||
Line 772: | Line 778: | ||
* Code: | * Code: | ||
- | <source http://eng-hope.swan.ac.uk/eg-259/examples/lecture9/navigate.html javascript|navigate.html> | + | <code html> |
+ | < | ||
+ | <!-- navigate.html | ||
+ | An example of using the navigator object | ||
+ | --> | ||
+ | <html lang=" | ||
+ | < | ||
+ | <meta charset=" | ||
+ | < | ||
+ | < | ||
+ | // The event handler function to display the browser name | ||
+ | // and its version number | ||
+ | |||
+ | function navProperties() { | ||
+ | alert(" | ||
+ | "The version number is: " + navigator.appVersion + " | ||
+ | } | ||
+ | </script> | ||
+ | </head> | ||
+ | <body onload = " | ||
+ | </html> | ||
+ | </code> | ||
===== Summary of This Lecture ===== | ===== Summary of This Lecture ===== |
eg-259/lecture9.1361379421.txt.gz · Last modified: 2013/02/20 16:57 by eechris