YouTip LogoYouTip

Vbscript Howto

VBScript Usage | Beginner Tutorial

VBScript Usage | Beginner Tutorial

Beginner Tutorial -- Not just skills, but dreams too!

VBScript Tutorial


VBScript Tutorial

Dive Deeper

Script Languages

Web Applications and Online Tools

Network Browsers

Programming

AI Tools, Chatbots, and Virtual Assistants

Network

Development Tools

Programming Languages

VBScript Usage

The HTML tag is used to insert VBScript into an HTML document.

VBScript in HTML

To insert VBScript into an HTML document, the script must be written between standard and tags.

In the tag, use the type attribute to define the scripting language "text/vbscript":

<html>
<body>
<script type="text/vbscript">
 ...
</script>
</body>
</html>

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

Image 2: lamp VBScript should not be used as a client-side scripting language! Here, we use only VBScript suitable for learning that works only with IE.

VBScript Output

When VBScript is used on an ASP page on a web server, the statement **response.write()** produces output.

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

Example (Only for Internet Explorer)

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

Try it yourself Β»

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

← Vbscript VariablesHtmldom Examples β†’