JavaScript .js Extension Files .js or Javascript extension files are handy for storing information that you want to control across multiple HTML pages. One perfect use is the page footer. It is much easier to update footer information across a site when you only have one file to adjust. Start with a footer that you have created for a page. We will turn this footer into a .js file.
<center><font size="2"> <a href="mailto:you@address.com">you@address.com</a> | 100 Main St., City, State | 800-111-1111 </center> – Start by replacing any double quotes with the single quote. – Begin each line of copy with: document.write(" – End each line of copy with: ") The resulting file will look like:
document.write("<center><font size='2'>") document.write("<a href='mailto:you@address.com'>you@address.com</a>") document.write(" | 100 Main St., City, State | 800-111-1111") document.write("</center>")
|