This scenario is inserted into the HTML-code with the help of the tag & lt; SCRIPT & gt ;.Insert scripts correctly is very important.They are placed inside the opening tag & lt; HEAD & gt ;.It made it to load script code before the page the user sees on the screen.If the script is placed in the end of the HTML-document elements of the document will then be loaded before.This attribute as LANGUAGE, used to specify the language of the script.When writing a script in JavaScript language can be omitted, sinceThe default JavaScript is considered the standard language.

In your browser, Internet Explorer, since version 4.0, can also be used scripts written in VBScript.To do this, you need to specify the scripting language - he will either VBScript, or VBS.In this exemplary embodiment the script is inserted into the header tag & lt; HEAD & gt ;.But it may be placed anywhere in th

e HTML-code.If different versions of the script is sometimes required to load the script after loading of page elements.

To effectively use a scripting language to create scripts (scripts), you must understand the structure of the object model of HTML-document.When creating a script, you need to understand what features and what objects are directed action.The thing HTML-document which is loaded when the browser sends some internal representation, is tied to a certain similarity with the object model.In HTML-document each item submitted to relevant subject.

example, if the user clicks the mouse button on the browser window, Windows sends this browser service message, which contains information about the mouse button pressed, and the keyboard, as well as the coordinates of a pointer to a specific part of the browser window.In this situation, the browser makes a decision - whether or not to process the command.If the user activates the button on the toolbar, then the browser will automatically process the event.

activating click the pointer inside the opened page, the browser object model will miss this event, because the HTML-page program contains a script which is responsible for handling the event.To insert scripts for the future correctly, can provide a way back.If the scenario involves response to the event, the instructions from the script to the browser are transmitted through the same object model.With this approach, the browser decides what to do with the page, and informs the system about it.The dynamic HTML user can specify the events to which the browser should react.