- Write the HTML you want repeated and save it to a separate file.
I like to save my include files into a separate directory, usually "includes". I would save my copyright information in an include file like this:
document.write("Copyright Jennifer Kyrnin 1992");
- Open the Web page where you want the include file to display.
- Find the location in the HTML where the include file should display, and place the following code there:
- Change the path and file name to reflect your include file location.
- Add that same code to every page you want your copyright information on.
- When the copyright information changes, edit the copyright.js file. Once you've uploaded it, it will change on every page of your site.
- Don't forget the document.write on every line of your HTML in the js file. Otherwise it won't work.