Instruction
1
Add a script (script) in the Html code of your page to make your website more interactive and dynamic. To insert a script, use the special tag < script >. Also you should specify the programming language in which it was written, with the tag Type. Code example: < html > < body > < script type= "Specify the type of script > Body script" < /script > < /body > < /html >.
2
Note that some early versions of browsers may not support processing the script and displays the code as plain text on the page. To prevent this, "hide" the content of the tag into the comment tag. In this case, the old browser will ignore its content, and the new will be able to recognize the script to execute even despite the fact that it is surrounded by comment tags.
3
For example, use this code: < script type= "Enter type script" > < !— "Enter the body of the script" //-- > < /script >. You can also use the tag < noscript >. In this case, the screen will display alternate text if the script execution failed. It is used in those browsers that support scripts, but at the moment this option is disabled. Then the program displays the text in the tag < noscript >. Code example: < script type= "Enter type script" > < !—Body script //-- > < /script > < noscript > "Enter text to be displayed instead of the script" < /noscript >.
4
Use to embed scripts on the website ready codes that you can find on the Internet. For example, to use the script on the page that will define the name of the user's browser and version, add to page this code to use JavaScript: < script language="JavaScript" > document.write("< BR > "the Name of your browser:" < b >"+navigator.appName+"< /b >"); document.write("< BR > "the Version of your browser" : < b >"+ navigator.appVersion+"< /b >").