Easy Tutorial
❮ Func Formatpercent Func Left ❯

VBScript Usage


The HTML <script> tag is used to insert VBScript into HTML.


VBScript in HTML

To insert VBScript into HTML, the script must be written between standard <script> and </script> tags.

Within the <script> tag, use the type attribute to define the script language as "text/vbscript": <script type="text/vbscript"> ... </script>

IE will interpret and execute the VBScript code between the <script> and </script> tags.

| | VBScript should not be used as a client-side scripting language! <br>Here, we use VBScript, which is only for IE, for learning purposes. | | --- | --- |


VBScript Output

When VBScript is used in ASP pages on a web server, the statement response.write() produces output.

When we use Internet Explorer to test VBScript, we use document.write() to produce output:

Example (Internet Explorer only)

<script type="text/vbscript"> document.write("Hello World!") </script>

In the above example, the browser outputs "Hello World!" to the HTML page.

❮ Func Formatpercent Func Left ❯