|
|||||||||||
SyntaxIncluding VBS into HTMLTo
include the script into you HTML document there needs to be the script
tag. You must specify the language as VBS or VBScript since the script
tags default language is JavaScript. <SCRIPT LANGUAGE="VBS"> VBS Scripting BasicsVBS is not case sensitive. That means you can use upper or lower case to refer to the same variable, function or statement. However this encourages sloppy code and should be avoided. If you declare myVar = 10; then don't refer to it any differently later on, such as MyVar;. Use
comments to make your code more readable. You can use either the
' or
REM.
Please note that when you use REM after a statement it must be preceded
by a colon. Document.Write "String" :REM this is my comment Create
short code lines. This will make your code easier to read and debug.
VBS includes a cool tool that links together two separate lines so when
the code is interpreted it is treated as one. Use the underscore character
preceded by a space at the end of the line to connect to the next line VBS code line1 _ Variables DIM Country Constants Declaring
Variables and Constants <SCRIPT LANGUAGE="VBS"> |
|||||||||||