|
External JavaScript Demoby Floyd Jay Winters 11/06/07, modified 11/23/2019. |
The header above will fade out and rotate into another header after 6 seconds.
The code below calls an External JavaScript routine named RotateHeaderFunction.js <script src="scripts/RotateHeaderFunction.js" type="text/javascript"> The RotateHeaderFunction.js file contains both the js
code and the lines to call the images in the slide show, as well as the
parameters for the width, heigth and speed. Right-click to View Source,
then click on the RotateHeaderFunction.js link to see the .js
file.
To call a JavaScript Routine:
1. Put the function, such RotateHeaderFunction.js file in the appropriate directory. I recommended you create a /scripts folder.2. In the body of your page call the function with the <script src=" code shown above.
Right-click to View Source to see how. |