Course
VBScript Tutorial for Beginner: Learn in 3 Days
Training Summary VBScript is a propriety client side scripting language by Microsoft, supported by...
VBScript (Visual Basic Script) is developed by Microsoft with the intention of developing dynamic web pages. It is client-side scripting language like JavaScript. VBScript is a light version of Microsoft Visual Basic. The syntax of VBScript is very similar to that of Visual Basic. If you want your webpage to be more lively and interactive, then you can incorporate VBScript in your code.
VBScript is just a scripting language. So, it cannot run its code on its own. It needs a bigger programming language to host it.
In this tutorial, you will learn more about-
Right now, there are 3 environments where VB Scripts can run.
You only need 2 simple tools to create and run VBScript code throughout this tutorial:
Let’s start by developing a simple VB Script program.
In this tutorial series, we will embed our VBScript code within a very basic HTML code.
This way, we can see VBScript in action by running the particular HTML file on the Internet Explorer web browser.
Open your text editor (Here, Notepad is used. You can use whichever text editor you want) and add the following lines of code.
<html>
<head>
<title>My First VBScript Code!!!</title>
</head>
<body>
<script type="text/vbscript">
document.write("Yes!!! I have started learning VBScript.")
</script>
</body>
</html>Now your text editor will look like this (the appearance and layout could be different based on the text editor you use):
In this program, the following sections constitute the HTML template.
<html>
<head>
<title>My First VBScript Code!!!</title>
</head>
<body>
<script type="text/vbscript">
document.write("Yes!!! I have started learning VBScript.")
</script>
</body>
</html>Only the section that starts with <script> comes as part of VB Scripting code.
Whatever string sequence you put in the document.write() will be displayed by IE as page text.
This code will simply output the statement “Yes!!! I have started learning VB Scripting.” on the browser page.
Go to File menu and click” Save” option. Now you will get a window like this: Click the Save button and you will see the file trial.html in the folder where you have saved your file.
To execute the VB Scripting code we have just created, we need to open the trial.html file in Internet Explorer.
If you have set IE as your default browser, you just need to double click the file trial.html.
If you have set any other web browser as your default browser, right-click the file and go to Open With --> Internet Explorer like this: Note: You may be shown a message to make IE your default browser
Now, the IE web browser will be opened with a security warning like this:
Training Summary VBScript is a propriety client side scripting language by Microsoft, supported by...
Why Loops are used in VBScript? Loops are used to execute the same block of code again and again....
Variables form the basis of programming. Variables are used to hold value or an expression....
Download PDF Following are frequently asked questions in interviews for freshers as well...
What is Conditional Statement? While programming, you will have to make certain decisions and...
In this tutorial, you will learn- VBScript Procedures Types of Procedures in VBScript Sub...