An ASP file normally contains HTML tags, just like an HTML file. However, an ASP file can also contain server scripts, surrounded by the delimiters < % and %>. Server scripts are executed on the server, and can contain any expressions, statements, procedures, or operators valid for the scripting language we prefer to use.
VBScript
• VBScript is a scripting language
• A scripting language is a lightweight programming language
• VBScript is a light version of Microsoft’s programming language Visual Basic
When a VBScript is inserted into a HTML document, the Internet browser will read the HTML and interpret the VBScript. The VBScript can be executed immediately, or at a later event.
Scripts in a page will be executed immediately while the page loads into the browser. This is not always what we want. Sometimes we want to execute a script when a page loads, other times when a user triggers an event.
Scripts to be executed when they are called or when an event is triggered go in the head section. When we place a script in the head section we will assure that the script is loaded before anyone uses it.
When we place a script in the body section it generates the content of the page.
JavaScript
To set JavaScript as the default scripting language for a particular page you must insert a language specification at the top of the page:
Tuesday, December 30, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment