answersLogoWhite

0

How a VBScript works?

User Avatar

Anonymous

14y ago
Updated: 8/19/2019

VBScript is a scripting language developed by Microsoft that is modeled on Visual Basic. A VBScript script must be executed within a host environment, of which there are several provided with Microsoft Windows, including: Windows Script Host (WSH), internet Explorer (IE), and Internet Information Services (IIS).

VBScript is a "fall through" type of language, where instruction code begins at the start of the file (line 1) and passes through the logic, jumping to other sections of the script when they are called upon as directed by the logic of the code itself.

For instance, a simple script might print a few lines of text, then have some logic that determines what to do next, dependent on a condition -- say perhaps time of day. Here's a sample of that:

<html>

<body>

<script type="text/vbscript">

Dim strTheTime 'Declare our variable for holding the time

' Print a message

' ---------------

document.write "This is a sample VBScript Program<BR>" &vbCrLf

' Get the time and save it to a variable called "strTheTime"

' ----------------------------------------------------------

strTheTime = Time()

' Evaluate the time and write either "Good Mornning" or "Good Evening"

If strTheTime > "12:00:00 PM" Then

document.write("Good Evening!")& vbCrLf

Else

document.write("Good Morning!")& vbCrLf

End if

</script>

</body>

</html>

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

How does a VBScript work?

VBScript, like Javascript is an interactive scripting language that works within HTML. For more information on how to use VBScript, visit the W3 Schools website by clicking on the related link.


When was VBScript created?

VBScript was created in 1996.


What is vbscript?

! VBScript is a Microsoft created program. It stands for Visual Basic Scripting


What has the author Matt Childs written?

Matt Childs has written: 'VBScript pocket reference' -- subject(s): VBScript (Computer program language)


What you need to study to create your website?

I would suggest you start with HTML and then move on to JavaScript VBScript would come after that. EX: &lt;html&gt;&lt;body&gt;&lt;!--HTML HERE--&gt; &lt;!--JAVASCRIPT STARTS BELOW--&gt; &lt;script language="JavaScript"&gt; //JAVASCRIPT HERE &lt;/script&gt; &lt;!--JAVASCRIPT ENDS HERE--&gt; &lt;!--VBSCRIPT STARTS BELOW--&gt; &lt;script language="VBScript"&gt; 'VBSCRIPT HERE &lt;/script&gt; &lt;/body&gt;&lt;/html&gt;


Which script interact with HTML?

Javascript or VBscript.


What is the default scripting language for ASPNET?

VBScript


What does the term VBScript refer to?

The Active Scripting language, VBScript, is short for Visual Basic Scripting. It is a scripting language that was developed by Microsoft. VBScript can be found in several Microsoft software, like the web browser Internet Explorer, where it serves a function similar to JavaScript.


What are the difference between vb and vbscript?

VB, or Visual Basic, is a scripting language developed by Microsoft. Visual Basic can be used to program many things, although it does have limits. VB also requires a compiler. VBScript on the other hand, does not. VBScript was also introduced by Microsoft, and is a simplified version of Visual Basic. While VBScript has more limitations than VB, Windows already comes with all you need to make a simple VBScript program. To make a VBScript program, you simply need to open a text editor, such as Notepad, type in the code and save it with a file extension of .vbs. If you are willing to download/buy a compiler, Visual Basic will be much more useful. However, if you only want to create simple programs, stick with VBScript. There is still a lot you can do with it.


Home page containing pull down menu box for the links using vbscript?

Home page containing pull down menu box for the links using VBScript.


Can you program something in Javascript that starts a VBScript?

Yes. Just create a VBScript function/sub in the same document, and since it would be a member of the window object, Javascript would also be able to call it, like so: &lt;script language='vbscript'&gt; sub test() alert("test") end sub &lt;/script&gt; &lt;script language='javascript'&gt; test(); &lt;/script&gt;


Why use VBscript in ASP?

The choice of VBscript in ASP versus other options is mostly personal perferance. Using VBscript allows you access to thousands of functions and operators to help you code easier, and more effectivley.A personal preference towards VBscript when coding in ASP may be because it follows the same style of programming. For example, a Javascript operator might look like this:&&Whereas an asp operator will be written as:AndVBscript follows this same methodology, and make for an easier "mesh" with the natural coding of ASP.