VBScript usage
HTML <script> tag is used to insert VBScript to HTML.
HTML in VBScript
To insert VBScript in HTML, the script must be written in standard between the <script> and </ script> tag.
In the <script> tag, use the type attribute to define the scripting language "text / vbscript":
<html>
<body>
<script type="text/vbscript">
...
</script>
</body>
</html>
<body>
<script type="text/vbscript">
...
</script>
</body>
</html>
IE will interpret and execute VBScript code <script> and </ script> between.
VBScript should not be used as a client-side scripting language! Here, we use only for IE VBScript for learning. |
VBScript output
When VBScript is used on a Web server ASP page statementresponse.write () output is produced.
When we use Internet Explorer to test VBScript, we use thedocument.write () to generate the output:
Examples (only for Internet Explorer)
<html>
<body>
<script type="text/vbscript">
document.write("Hello World!")
</script>
</body>
</html>
<body>
<script type="text/vbscript">
document.write("Hello World!")
</script>
</body>
</html>
try it"
In the example above, the browser output "Hello World!" To the HTML page.