December 2001
Intermediate to advanced
480 pages
9h 22m
English
While declaring a variable in JavaScript is optional, it is not in VBScript. You must use a Dim (for dimension) statement to first declare the variable.
<%
Dim animal
animal = "Zebra"
%> To declare multiple variables, you can use a single Dim statement:
Dim customers, products, prices So, remember that while declaring a variable is optional in JavaScript, it is not in VBScript.
As in JavaScript, data are not typed. That is, the variables are “smart” and will change type with the context of their use. Also as in JavaScript, you can use HTML tags as values in VBScript.
<%
Dim newpar, one, two, three newpar = "<p>" one = "The loneliest number." two=222.222 three= 3 Response.write one Response.write ...Read now
Unlock full access