Look at a Script
So how complicated are JavaScript scripts? And how do you recognize one in an HTML text page?
Scripts can range from the very basic to the very complex, depending on what they do and how they were written. It's easy to spot a JavaScript script in an HTML source file. Just look for the tags:
<script language="javascript"> and </script>.
The script appears between them. Most often, the script will be at the very beginning of the HTML text file.
In most cases, it is good style to place the scripts first. In other cases, it is essential that the script is first. For example, if you are using a script to see what type of browser the reader is using and to deliver the appropriate page for that browser type, the detection script must be the first thing in the file or the script won't work correctly.
This is an example of a script. Click on it to see how it acts. The example appears in the window at the top of the screen:
<script language="javascript">
document.writeln("This line of text<br>");
document.writeln("Is generated by a script");
</script>
This is a very simple script: