![]() |
||||||||||||||||
| Home --- Topics --- Articles --- Offers --- Register --- Contact us | ||||||||||||||||
|
|
||||||||||||||||
|
Did you know? if you register at Hamid School you can save up to 45% on hosting packages offered by Surreyhost.com . Don't miss out, every minute counts! Are you Confused? Click here to learn how to use hamid school HTML ScriptsAdd scripts to HTML pages to make them more dynamic and interactive. Insert a Script into HTML PageA script in HTML is defined with the <script> tag. Note that you will have to use the type attribute to specify the scripting language.
The script above will produce this output: Hello World! How to Handle Older BrowsersA browser that does not recognize the <script> tag at all, will display the <script> tag's content as text on the page. To prevent the browser from doing this, you should hide the script in comment tags. An old browser (that does not recognize the <script> tag) will ignore the comment and it will not write the tag's content on the page, while a new browser will understand that the script should be executed, even if it is surrounded by comment tags. Example
The <noscript> TagIn addition to hiding the script inside a comment, you can also add a <noscript> tag. The <noscript> tag is used to define an alternate text if a script is NOT executed. This tag is used for browsers that recognize the <script> tag, but do not support the script inside, so these browsers will display the text inside the <noscript> tag instead. However, if a browser supports the script inside the <script> tag it will ignore the <noscript> tag. Example
Viewed:494 Original Author: W3school however, some changes have been made to the main contents.
Did you know? if you register at Hamid School you can learn web programming and designing for free and also you can save up to 45% on hosting packages offered by Surreyhost.com . Don't miss out, every minute counts!
|
|
|||||||||||||||
|
Sponsored by: Surreyhost.com Coded and designed by: Hamid Moudi HPLA Follow us: ![]() ![]() |
||||||||||||||||