July 2011
Intermediate to advanced
276 pages
5h 11m
English
Imagine how our alarm clock works. We set a listener, so to speak, on the device such that it listens and waits for the action of the time we wish to receive an alarm. In our HTML DOM, we can add listening events as properties when we create an element. When the listener is fired, the defined action will execute!
Create an anchor tag, set a listener on it, and define the action to take when the listener is activated, in other words, do something when the link is clicked:
<iframe id="miframe" src="http://bing.com" width="800" height="400"></iframe> <style type="text/css"> a { cursor:pointer; display:block; color:#00F; text-decoration:underline; font-size:20px; } </style> <noscript>JavaScript ...