Sunday, September 26, 2010

Enhancing links with JavaScript

 enhanced interactivity and functionality to links. Note that in all cases, a non-JavaScript
backup (or fallback) to essential content is required for those who choose to surf the Web
with JavaScript disabled. In all cases, JavaScript can be added either to external JavaScript
files attached to your HTML documents (which is the preferred method; see the section
“Attaching favicons and JavaScript” in Chapter 2) or in a script element within the head
of the HTML page:
<script type="text/javascript">
// <![CDATA[
(script goes here)
// ]]>
</script>
Specifically, we’ll look at pop-up windows, swapping images using JavaScript, and toggling
div visibility with JavaScript.

No comments:

Post a Comment