|
scripts
PAGE UPDATE How to update multiple pages at once. Say you have a piece of code that you want to put on several pages. This code may be a copyright notice or a menu etc. If you want to update the code you have to change the code on each page. Don't you? Not necessarily! Here is how to do a piece of code once, and then put it on different pages (or even at different places on the same page). You need to create your code (this can be ANY HTML code): You then create an external javascript file (here called copyright.js) All you do is put the code within the write method of the document object: Copy the script source wherever you want the output to go: This is what the output looks like: |
|
|