VBScript First Script
We like to teach by example, here at Tizag.com, so let's start off with a simple VBScript example that will help you get your feet wet. Reminder: We will not be explaining the HTML in this tutorial so review our HTML Tutorial if you ever need extra assistance understanding an example or lesson.VBScript Script Creation
This first script will be very basic and will write "Hello World" to the browser window, just as if you had typed it in HTML. This may not seem very important, but it will give you a chance to see the VBScript Syntax without getting to complex.VBScript Code:
<html> <body> <script type="text/vbscript"> document.write("Hello World") </script> </body> </html>
Display:
Display:
Hello World
VBScript <script> Tag
In the above example you saw the basic cookie cutter for inserting a script into a web page. The HTML script tag lets the browser know we are going to use a script and the attribute type specifies which scripting language we are using. VBScript's type is "text/vbscript".All the VBScript code that you write must be contained within script tags, otherwise they will not function properly.
0 comments:
Post a Comment