How to Use <SCRIPT> Tags
Use of JavaScript in documents:
JavaScript WorkshopWelcome to the workshop.
Thanks for joining us!
|
Here's how that would look:
Thanks for joining us!
JavaScript commands can be associated with events or executed by clicking on anchor tags:
See how these work:
Check out Shippensburg University's web site.
Welcome to our workshop.
Certain older browsers do not support JavaScript. Because HTML is designed to be upwardly compatible, these browsers would ignore the <SCRIPT> </SCRIPT> tags. However, the text between the tags (the JavaScript commands) would be displayed.
Use the HTML comment tags ( <!-- and --> ) to hide the commands from the browser:
My First JavaScript |
Your page should look like this.