VBScript Getting Started
Overview VBScript is a VB scripting language used in an HTML file. It is a subset of VB, which can achieve the function of part VB, so that the HTML language is greatly expanded. If you have learned VB, then VBScript is just a snatch for you, and you only have to remember what kind of grammatical commands cannot be used in "VBScript", but not to remember which commands can be used. But if you have not learned VB, don't matter, because it is just a subset of VB, what you want is relatively less than VB, I promise, you can learn soon. Let me first say this paper: mainly facing beginners, I have not included VBScript all included, but some of them are relatively common. HTML Introduction Before studying VBScript, we have to look at the HTML language. Since VBScript is based on the big frame of HTML, if there is no HTML support, then VBScript is nowhere to place. HTML is a very easy language, so when you see so many beautiful pages, don't think it is how difficult it is. It does not have any branches and loop statements, what it does just tell the browser how to display what it specifies it. There are now many webmaking tools, such as FrontPage, most of them can complete your most work, even if you don't understand HTML, you can also make quite standardized web pages. As someone is said, "ForntPage" is used to make a web page, and the HTML language is to better modify the web page. There is a concept in the HTML language is "Mark", please see a simplest example:
爱 武 's Personal Home Title> head> < / Body> html> In this example, such as , , etc. These "<", ">" include a sign word in the middle. Another point is that the symbol is general (except for individual) is pair, such as and head>, its role is to emphasize the beginning and end of a paragraph, that is, the overall concept. Let's take a look at the examples above: and html> are always located at the beginning and end of the program, which is essential part; and head > Represents the header of the program, such as the title, etc., you must set in the header;
and title> Used to set the title of the program, the title you set will appear in the title bar of the browser in. For example, if we set the title "The Personal Home Homepage of Love", then "the personal home page-Microsoft Internet Explorer" in the browser's title bar (if it is not a special instruction, all in IE4 The browser is tested). and body> are the main part of the program, various graphics, and text input can be performed here. If you use FrontPage, then the above work will be completed by FrontPage, without having to write a code. To write text in the program, you can use the
and p> logo.
If we join and head> in the previous example, please visit the personal home page P> of Aiwu, then when you open the program with your browser, you will appear on the form "Welcome" The words of the personal home page of Aiwu. The powerful vitality of HTML is also its "super connection" function. We can often see online. When the mouse is moved to a graphic or a string text, the mouse graph will turn into a small hand, and when the mouse is down, the corresponding connection is opened, which is super connection. Its implementation is not difficult, see if the next example will understand. Aiwu's personal homepage and can be understood as superconnected signatures, tight after A "Href = ..." means a superconnected address, and "the personal home page of Aiwu" means the content that will be displayed on the form. After the implementation of this example will be displayed on the form, "on the personal home page" is displayed, and it will be connected to http://yuaiwu.163.net. Look at the example: Write a letter to me , where Mailto said that this super connection is to point to a mailbox, you can give YuaiWu@163.net Send a letter. If we want to make a file download function, it is simpler. Just put the super connection to a certain file, just as shown in the following example: download and body>, such as
Yu Awu's personal homepage title>
HEAD>
Msgbox "Welcome to Aiwu's Personal Home"
->
Script>
Body>
Html>
Let's take a look at the execution of the program: A dialog box appears, showing a welcome information: "Welcome to the personal home page of Aiwu." Let's analyze the program code: