RU beehive logo ITEC dept promo banner
ITEC 325
2016spring
ibarland

homelectshws
D2Lbreeze (snow day)

js-events
calling javascript
the mechanics of invoking from the browser

We saw an example of javascript that was run by the browser; we defined the javascript functions in the head (or, in a separate file which was included via a <script src= > tag in the head). Then, in various tags we had onclick attributes, whose value was a bit of javascript code, which the browser then evaluated. (e.g. Whatever you do don't click <span onclick="explode();">here</span>.).


1 Yes, this anomoly seems weird to me too. But apparently, when the DOM is constructed from the HTML string, the HTML attribute class turns into the DOM attribute className, unlike every(?) other attribute.      

2 That is, the half-open range [21,40) — half-open ranges are the right way to deal with integer ranges.      

3 Or even better: a “insertMsg” which includes a boolean -- should the message be inserted with a style of “error-occurred” or a style of “all-okay” (which might render in small happy green font).      

homelectshws
D2Lbreeze (snow day)


©2015, Ian Barland, Radford University
Last modified 2016.Mar.16 (Wed)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.