HTML and CSS Reference
In-Depth Information
To write the e-mail link for Catherine Adler:
1. Return to the mpl.htm file in your text editor.
2. Directly after the opening <script> element you added earlier, insert the follow-
ing command:
document.write(“<aƒhref= ' mailto:cadler@mpl.gov ' >”);
3. Directly before the closing </script> tag, insert the following command:
document.write(“</a>”);
Figure 10-10 shows the revised code in the file.
Figure 10-10
inserting several document.write() commands
4. Save your changes and then reopen mpl.htm in your Web browser.
5. Hover your mouse pointer over the e-mail address to verify that it is a link. As
shown in Figure 10-11, the link to the e-mail address should appear in the brows-
er's status bar.
Figure 10-11
viewing an e-mail link
e-mail address is
a hypertext link
t ext of the
e-mail URL
Trouble? If the link does not appear, verify that you included the opening and
closing quotation marks in the JavaScript commands you just entered.
Search WWH ::




Custom Search