Search w3schools.com:

SHARE THIS PAGE

VBScript How To


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


VBScript in HTML

VBScript is inserted into HTML, between standard <script> and </script> tags.

Use the type attribute in the <script> tag to define the scripting language "text/vbscript":

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

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

lamp VBScript should not be used as a client-side scripting  language!
Here, we use VBScript in IE only for learning.


VBScript Output

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

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

Example (Internet Explorer Only)

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

Try it yourself »

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





W3Schools Certification

W3Schools' Online Certification

The perfect solution for professionals who need to balance work, family, and career building.

More than 10 000 certificates already issued!

Get Your Certificate »

The HTML Certificate documents your knowledge of HTML.

The HTML5 Certificate documents your knowledge of advanced HTML5.

The CSS Certificate documents your knowledge of advanced CSS.

The JavaScript Certificate documents your knowledge of JavaScript and HTML DOM.

The jQuery Certificate documents your knowledge of jQuery.

The XML Certificate documents your knowledge of XML, XML DOM and XSLT.

The ASP Certificate documents your knowledge of ASP, SQL, and ADO.

The PHP Certificate documents your knowledge of PHP and SQL (MySQL).

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]