VBScript Usage | Beginner Tutorial
Beginner Tutorial -- Not just skills, but dreams too!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
VBScript Tutorial
- VB Script Tutorial
- VBScript How-to
- VBScript Variables
- VBScript Procedures
- VBScript Conditionals
- VBScript Looping
- VBScript Summary
- VBScript Examples
- VBScript Functions
- VBScript Keywords
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.
| 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>
In the above example, the browser outputs "Hello World!" to the HTML page.
YouTip