VirtualMV/JavaScript/JS and HTML

JavaScript and HTML

 * When a JavaScript is inserted into an HTML document, the Internet browser will read the HTML and interpret the JavaScript. The JavaScript can be executed immediately, or at a later event, depending how and where it is placed.
 * To add JavaScript to an HTML page enclose code between


 * Note. You may find &lt;script language ="Javascript"> in code you see on the Internet. The language attribute has been deprecated so avoid using it in your code.


 * Example HTML page with JavaScript

Example : Click here to run js1_01. The diagram following shows the result in Google's chrome.