VBScript Getting Started

zhaozj2021-02-17  84

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> < / Body> </ html> In this example, such as <HTML>, <HEAD>, etc. These "<", ">" include a sign word in the middle. Another point is that the symbol is general (except for individual) is pair, such as <head> 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: <html> and </ html> are always located at the beginning and end of the program, which is essential part; <head> and </ head > Represents the header of the program, such as the title, etc., you must set in the header; <title> 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). <Body> 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 <p> and </ p> logo.</p> <p>If we join <pin> 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. <a href="http://yuaiwu.163.net"> Aiwu's personal homepage </a, where <A> and </a> 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: <a href="mailto: <a href="mailto :> Write a letter to me </a>, 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: <a href = "sample.zip"> download </a this, when we click When "download", you will download "Sample.zip". There is also the most important thing is the image problem. How can I add a beautiful background picture to a page? This will be specified in <body> and </ body>, such as <body background = "images / wb02102_.gif", illustrating the WB02102_.gif file under the subdirectory of the current directory, will be used as the web page Background picture. The background image should be paid to the background choice should be coordinated with the foreground content, should not have a sense of hidden, and should not be too glaring, giving people a sense of resentment, and there is a picture size should not be too big, if people spend Waiting for a background, it will be annoying. If you want to place a picture on the form, you can write directly into "IMG SRC =" WB02102_.gif "". Vbscript language I didn't want to advocate VBScript. How strong, I just want to say that VBScript is really a simple and creative language. I advocate learning VBScript such language to learn while learning, because it is "what you see", so you can deepen your impression of it. Let's take a very small example, let it take you into the world of VBScript.</p> <p><Html></p> <p><HEAD></p> <p><Title> Yu Awu's personal homepage </ title></p> <p></ HEAD></p> <p><Body></p> <p><Script language = "vbscript"></p> <p><! -</p> <p>Msgbox "Welcome to Aiwu's Personal Home"</p> <p>-></p> <p></ Script></p> <p></ Body></p> <p></ Html></p> <p>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: <script language = "vbscript"> represents the beginning of the VBScript scripting language, and </ script> means the end of VBScript. The code placed in this is the VBScript language. Another point is that there is a line in <Script language = "vbscript">, there is a line "->" on </ script>, and these two symbols correspond to the meaning of comments. The reason why the source code is commented is because if some browsers do not support VBScript, they can only treat it as a comment without any impact on the program. Of course, browsers that support VBScript like IE will automate it without having to worry that it is comment. "Msgbox" is a message box that is the content displayed later.</p> <p>When you say this, you should talk about FrontPage. The new version of FrontPage98 provides a number of features that can not only make web pages, but also easily inserting the VBScript scripting language, which we will use it often. In fact, VBScript can't be a real language. So far, VBScript has no special editor and debugger, which is not comparable to VB, but because VBScript is a subset of VB, so VBScript content is Most of VB can pass, so if we want to write the VBScript programs of the large segment, we can write, debug, wait for the vb, and then make a slight correction, you can use it under VBScript.</p> <p>I have to completely learn this VBScript "language", I will start from its variable like introducing other languages.</p> <p>VBScript variable</p> <p>In a sense, VBScript has only one variable type, namely variant. That is, a variable can represent a value, or it can be used to represent a string. Is this good? It is good for us because it removes a lot of box boxes, allowing us to use variables carefree, but for the program itself, it is unfavorable because it greatly limits the execution efficiency of the program (but we can Whether it is easy to use it as long as it is easy to use). If you want to define a variable, you can use the DIM statement:</p> <p>Dim A, B</p> <p>Two variables A and B are defined. If you don't want to write this sentence, you can use the variables directly without the definition, but we don't advocate this, because on the one hand, the current programming language pays attention to the rules of the rules, if your program is given to others Look, you are not faceless, on the other hand, it is the most important thing, it will bring trouble to your debugger. The following example is a trouble:</p> <p>DIM A, B, C</p> <p>A = 10</p> <p>B = 20</p> <p>C = a bb</p> <p>Msgbox C</p> <p>My originality is to find the value of A B, but the result is 10 instead of 30, because the variable BB is not defined, so it uses its default 0.</p> <p>One way can enable you to define variables, just add a "option expendit" in the first part of the program, so if there is a variable that the BB flow is not defined, the program will be wrong, wait for you to modify , Not just give a result of a wrong result.</p> <p>I mentioned above. From a sense, VBScript has only one variable type ", that is, in another sense, VBScript can also have multiple variable types, but to use forced conversion means. After the corresponding conversion function is converted, we can use integers, long integers, strings, single precision, double precision. I. CINT (), CLNG (), CSNG (), and CDBL () four functions are used to convert a variable to integer, long integer, single precision type, and double-precision type. For example: CINT ("10") = 10, ClNG ("65537") = 65537, CDBL ("3.5") = 3.5. These four types are different. First, CINT (), clng () is converted into an integer, where cint () is a general integer, which accounts for two bytes, and clng () is converted into one Long integer, it takes up four bytes. The range can be represented by an integer is -32768 ~ 32767, while the long integer range can be increased to -2147483648 ~ 2147483647, how, so long, so if the result of the conversion can not be expressed within the range Time to consider using long integer. CSNG (), CDBL () is a decimal conversion function, which can convert a variable into a decimal, the difference is only different, if the accuracy is not high, can be used, if the precision is high, then It is necessary to adopt double precision. However, both of them can represent a wide range. If there is no special requirements, single-precision data can meet our needs. Please see the case:</p> <p>Option expedition</p> <p>DIM A, B, C</p> <p>A = "10"</p> <p>B = "20"</p> <p>C = CLNG (a) ClNG (b)</p> <p>Msgbox C</p> <p>The final output result is 30, if we change C = CLNG (a) clng (b) to c = A b, then the last result should be 1020, because C is the role of the two characters together That is 1020; if it is rewritten as C = CLNG (A B), the last result is also 1020, because it first adds the character string first, and then converts the resulting string into the corresponding number.</p> <p>II. CSTR () is converted a variable into a string, if the above rewriting is as follows:</p> <p>Option expedition</p> <p>DIM A, B, C</p> <p>A = 10</p> <p>B = 20</p> <p>C = CSTR (a) CSTR (b)</p> <p>Msgbox C</p> <p>The last result is equal to 1020, not 30, why, because it first converts the numerical value into a string and then adds.</p> <p>III. CBOOL () is to convert an expression value into a logical value "true" or "false". The rule of the conversion is that if the expression is 0, if the result is non-zero, the result is true, so it is true for a string. Conversely, if the logic really looks like a value, then it is equal to -1, logical fake is 0. Look at the following expression:</p> <p>A = 10</p> <p>B = 10</p> <p>C = CBOOL (A) Results for True</p> <p>C = CBOOL (CSTR (A)) Results for TRUE</p> <p>C = CBOOL (a) CBOOL (B) result is -2</p> <p>For the first two results, it is very understanding, but the third is because CBOOL (A) and CBOOL (B) are TRUE, and when the addition is calculated, it is automatically converted into an integer, namely -1 and -1 Plus, the result was obtained -2IV. The cdate () function can convert a variable into a date-type variable, such as: CDATE ("1999-25") is a date-based result. The meaning of the conversion is that we can correctly judge the order of the two dates, for two strings "1999-2-2" and "1999-2-3", "1999-2-2" <"1999 -2-3 ", when the conversion becomes CDATE (" 1999-2-2 ")> CDATE (" 1999-2-3 "), the truth is obvious, and the No. 2 is in front of No. 3.</p> <p>V. The above introduced some conversion functions, also mentioned the data type in VBScript, where the most important string is characterized. Most of HTML is to display a string of the specified content. Due to the addition of VBScript, the string processing function is double "strong". With the VBScript function, we can load, add equal operations for strings.</p> <p>LEFT, Right is a detachable or right cut to the string. Please see the example:</p> <p>A = "123456789"</p> <p>B = Left (a, 3)</p> <p>MSGBOX B</p> <p>C = Right (A, 3)</p> <p>Msgbox C</p> <p>The result thus obtained is b = "123", c = "789".</p> <p>If we want to load several characters in the middle of a string, the result can be used in the MID function, such as C = MID (A, 4, 3) is C = "456".</p> <p>Asking for a string is used by the LEN function, such as Len ("1234567") = 7.</p> <p>VI. Array:</p> <p>VBScript also provides an array operation like other programming languages. Define a format of an array as follows:</p> <p>DIM A (10)</p> <p>That is, an array is defined, the name of the array is A, and its elements are from 0 to 10 together. Let's give these 11 elements to this 11 elements:</p> <p>For i = 0 TO 10</p> <p>A (i) = i</p> <p>NEXT</p> <p>The values ​​of 11 elements are 0, 1, ..., 10, respectively. If you want to define other types of arrays, you can make a slight modification in the format above.</p> <p>2. What is introduced above is VBScript variables, we must fully learn from other content. Let's take another point in VBScript: branch and loop.</p> <p>I. The branch refers to the conditional judgment statement of if ... then ... Else ... End IF structure.</p> <p>As shown below:</p> <p>A = INPUTBOX ("How old are you this year")</p> <p>IF CINT (a) <20 THEN</p> <p>Msgbox "You are a small comrade"</p> <p>Else</p> <p>Msgbox "You are not a small comrade"</p> <p>END IF</p> <p>In the example, a function inputbox () is used, and its role is to receive a string input from the keyboard, such as if I entered 20 if I input 20, then A = "20". The idea of ​​this example is by the user to enter a age value and then determine its size. If it is less than 20, the output "You is a small comrade", otherwise, "You are not a small comrade".</p> <p>This example is simplified into the following form:</p> <p>A = INPUTBOX ("How old are you this year")</p> <p>IF CINT (a) <20 THEN</p> <p>Msgbox "You are a small comrade" endiff</p> <p>Then there is a response to the input value of less than 20, and the content of "Otherwise" does not answer, if the age value you entered is 40, you will find that the program will ignore you. It can also be further simplified</p> <p>A = INPUTBOX ("How old are you this year")</p> <p>IF Cint (a) <20 Then Msgbox "You are a small comrade"</p> <p>The end IF is omitted. But because this way of writing is not easy to read, I hope that everyone can write every step according to the requirements.</p> <p>Return to the previous example:</p> <p>A = INPUTBOX ("How old are you this year")</p> <p>IF CINT (a) <10 THEN</p> <p>Msgbox "You are a child"</p> <p>Elseif Cint (a) <20 THEN</p> <p>Msgbox "You are a small comrade"</p> <p>Elseif Cint (a) <40 THEN</p> <p>Msgbox "You in Youth"</p> <p>Elseif Cint (a) <50 THEN</p> <p>Msgbox "You in Middle Age"</p> <p>Else</p> <p>Msgbox "You have been an age"</p> <p>END IF</p> <p>There is also a class of branches that are SELECT ... CASE ... END SELECT. For example to explain: We must determine it in a few months based on the number of input numbers.</p> <p>Dim A, Mon</p> <p>A = INPUTBOX ("Is it now a few months?")</p> <p>SELECT CASE CINT (A)</p> <p>Case 1</p> <p>Mon = "one"</p> <p>Case 2</p> <p>Mon = "two"</p> <p>Case 3</p> <p>Mon = "three"</p> <p>Case 4</p> <p>Mon = "four"</p> <p>Case 5</p> <p>MON = "five"</p> <p>Case 6</p> <p>MON = "six"</p> <p>Case 7</p> <p>MON = "seven"</p> <p>Case 8</p> <p>Mon = "eight"</p> <p>Case 9</p> <p>MON = "nine"</p> <p>Case 10</p> <p>MON = "Ten"</p> <p>Case 11</p> <p>Mon = "11"</p> <p>Case 12</p> <p>MON = "Twelve"</p> <p>End SELECT</p> <p>Msgbox "is now" Mon "month"</p> <p>If this example is also done with if ... Then, I am afraid I have to write a lot of code! If there is a usage of the SELECT structure, please see the case:</p> <p>Dim a, quarter</p> <p>A = INPUTBOX ("Is it now a few months?")</p> <p>SELECT CASE CINT (A)</p> <p>Case 1, 2, 3</p> <p>Quarter = "one"</p> <p>Case 4, 5, 6</p> <p>Quarter = "two"</p> <p>Case 7, 8, 9</p> <p>Quarter = "three"</p> <p>Case 10, 11, 12</p> <p>Quarter = "four"</p> <p>End SELECT</p> <p>Msgbox "now is the first quarter " quarter "</p> <p>In this example, we can determine it in the first quarter according to the month of the input month.</p> <p>If the IF branch and the Select branch are useful, we can use different methods according to different needs, so that VBScript can be fully utilized.</p> <p>II. For ... Next loop:</p> <p>VBScript's cycle mainly has two kinds of for ... next loops and do while ... Loop cycle, let's first talk about the for ... next loop. Please see the case:</p> <p>DIM I, SUM</p> <p>For i = 1 to 100Sum = SUM I</p> <p>NEXT</p> <p>Msgbox Sum</p> <p>This example is calculated from 1 to 100 of 100 numbers, and the result is 5050, we play this game from the beads from a child. If you want to calculate the sum of 1 to 1000, it is very simple, as long as 100 in the above example is changed to 1000. Please see an example:</p> <p>DIM I, SUM</p> <p>For i = 1 to 100 STEP 2</p> <p>SUM = SUM I</p> <p>NEXT</p> <p>Msgbox Sum</p> <p>This example is used to calculate the odd number between 1 and 100. If you want to calculate the sum of 1 to 100, you can change the cycle condition to for i = 2 to 100 STEP 2.</p> <p>Step is the intention of the step, that is, the incremental value of the cyclic variable is changed once, if not, the default is 1. We can even set the value of STEP as a negative value, such as the next example, still able to achieve 1 to 100 orientation summation:</p> <p>DIM I, SUM</p> <p>For i = 100 to 1 step -2</p> <p>SUM = SUM I</p> <p>NEXT</p> <p>Msgbox Sum</p> <p>III. Do While ... loop loop:</p> <p>The FOR cycle is the number of times the cycle is loop, while the Do While ... Loop loop is a loop when the condition is met, otherwise the loop is jumped, and the number of cycles is strictly qualified as the for loop.</p> <p>Also calculated and as an example of 1 to 100, modifying the DO While ... Loop cycle is represented as:</p> <p>DIM I, SUM</p> <p>I = 0</p> <p>Do While i <100</p> <p>I = i 1</p> <p>SUM = SUM I</p> <p>Loop</p> <p>The result of this example is correct. But if we transform the position of the two lines in the above cycle, it is:</p> <p>Do While i <100</p> <p>SUM = SUM I</p> <p>I = i 1</p> <p>Loop</p> <p>The resulting results will be 4950 instead of 5050. What is the problem? Just on the cycle of judgment. When the cycle is just starting, I = 0, SUM = SUM I = 0, when I = 99, SUM = SUM 99, then i = i 1 = 100, no longer meet the condition of the loop, therefore Exited the loop. That is, it is also cycled to 100 times, but is executed from 0 to 99, rather than from 1 to 100.</p> <p>Two kinds of cycles are also the same as they have, we should also decide which way to use according to the actual situation, do not move hard.</p> <p>3. VBScript Custom Function:</p> <p>Custom functions include both subroutines and functions, the difference between them is that the function has a return value, while the subroutine is not. In essence, there is no difference between the two.</p> <p>Let's first give an example to explain the minor:</p> <p><Script language = "vbscript"></p> <p><! -</p> <p>Option expedition</p> <p>DIM A</p> <p>Sub Age ()</p> <p>A = INPUTBOX ("Please enter your age:")</p> <p>End Sub</p> <p>AGE</p> <p>MSGBOX A</p> <p>-></p> <p></ script></p> <p>This example makes the function of the input age into a subroutine, calls in the main program, the format called is also very simple, as long as the name of the subroutine can be written, it is as much as it is called an internal command.</p> <p>The function and subroutine are similar, but it can return a value. Let's compile a function of a larger value in two numbers:</p> <p>DIM A, B, C</p> <p>A = 10b = 20</p> <p>C = max (a, b)</p> <p>Msgbox C</p> <p>Function max (x, y)</p> <p>IF x <yzhen</p> <p>Max = y</p> <p>Else</p> <p>Max = x</p> <p>END IF</p> <p>END FUNCTION</p> <p>The max () function in this example is a function we have written in our own, there are two parameters inside it, and you can put it in both parameters when used. One point to pay attention to the return format of the function: our function name is Max, and finally you can write to the Max = ... You can return to this function.</p> <p>At this point, we introduced most of the grammar content of VBScript. Although there is nothing to do, it is the premise of your other work. If there is no solid grammatical basis, what other work is not good, I hope everyone can have a lot Exercise.</p> <p>Objects in Vbscript:</p> <p>VB is an object-oriented program language, VBScript is no exception (at least it is used to use the concept of object). Objects have brought a lot of benefits to programming, which is also reflected in VBScript.</p> <p>1. Like VB, we can add a command button on the form (object), if you are using FrontPage, then your workload is small, just place the control according to the style you have obtained. It is okay in the correct location. If you want to edit the web directly with the editor such as Notepad, then you have to pay some strength.</p> <p>Before introducing other objects, let me first say a relatively special object: Timer. Its role is to perform a thing every time, if you have learned VB, this will be very easy to understand. The attributes of the timer are mainly: enabled, interval, enabled indicates whether it is available, and INTERVAL refers to a long period of time, and its unit is 1/1000 seconds.</p> <p>If you want to join a timer, it is best to use FrontPage. After selecting Insert-Advanced-ActiveX Control in the menu, a dialog box will pop up, you can find Timer Object in the drop-down menu. One thing can't forget, just give it a name, otherwise you can't use it. You can also set it to your Enabled, the Interval property in order to click on the Property button. Now let's join a timer that is "TMRLBL" time interval 200 milliseconds, and the following code will appear in the source code of HTML:</p> <p><object id = "TMRLBL" width = "39" height = "39"</p> <p>ClassID = "CLSID: 59ccb4a0-727d-11cf-ac36-00aa00a47dd2"></p> <p><param name = "_ extentX" value = "2064"></p> <p><param name = "_ excenty" value = "2302"></p> <p><param name = "interval" value = "200"></p> <p></ Object></p> <p>As long as you look at it, you will know how difficult it is written by manual.</p> <p>Now there is a timer, we must also encode its events to use it. The timer has an event called "Timer". Every time, this event will be performed over. We can program it as follows:</p> <p><script language = "vbscript"> <! -</p> <p>SUB TMRLBL_TIMER ()</p> <p>Msgbox "Welcome!"</p> <p>End Sub</p> <p>-></p> <p></ script></p> <p>Please wait a moment, first turn the value of the value of the Timer's Interval property, otherwise you will think that it is a virus. This program can appear a dialog in a period of time, display "Welcome", if you set the time to 200, then you may not have a react, there will be the next dialog, the result is that you can't close the dialog, The browser can not be closed, so it is necessary to make the time interval, so that you have time to end it.</p> <p>label:</p> <p>Add two labels (Microsoft Forms 2.0 Label) with the same method to join the timer, and name LBLYU0 and LBLYU1, the fonts can be set, so that in order to observe, the CAPTION attribute of the two labels will be used. Set to "Y" and "U" (set the method of timer controls). Then program the timer again:</p> <p><script language = "vbscript"></p> <p><! -</p> <p>SUB TMRLBL_TIMER ()</p> <p>lblyu0.Forecolor = RGB (255 * RND, 255 * RND, 255 * RND)</p> <p>lblyu1.forecolor = RGB (255 * RND, 255 * RND, 255 * RND)</p> <p>End Sub</p> <p>-></p> <p></ script></p> <p>Let's take a look at the effect, um, good! Then let's analyze this program. We use the foreground color properties of the label control: ForeColor, as long as you change it, you can change the color of the label, just as you can see.</p> <p>RGB () is a color function, which has three parameters, indicating red, green, blue three-color ratio, 0 means not, 255 is full color. To indicate that red can be written into RGB (255, 0, 0), the ratio of red is 100%, while the other two colors are not. So to indicate white, that is, RGB (255, 255, 255), black, readers can think about it.</p> <p>There is also an "RND" that represents a random number from 0 to 1, and if using RND * 255, it can represent a random number between 0 and 255.</p> <p>Therefore, the above example can show the label of color random change. If you have patience, you can debug a more beautiful label.</p> <p>3. Window</p> <p>"Window, the window opened by the browser. Its object name is Window, an important attribute is Status, which is the status bar under the browser so that we can let the status show our own information.</p> <p>If we write this: window.status = "On the Personal Home" of Aiwu, the string of the form will be displayed on the status bar of the form.</p> <p>The Window object has two events onload and onunload. Add the following code:</p> <p><Script language = "vbscript"></p> <p><! -</p> <p>Option expedition</p> <p>Sub window_onload ()</p> <p>Msgbox "Welcome"</p> <p>End Sub</p> <p>Sub window_onunload ()</p> <p>Msgbox "Welcome to" end sub</p> <p>-></p> <p></ script></p> <p>In this way, whenever you open this page, you will display the prompt information of "Welcome", and when you quit this page, you will show the "welcome" bid.</p> <p>Control array</p> <p>When the type of variable is described above, it is mentioned that VBScript can define an array where you will see the type of array or even a control. That is, the label is an example, we create 10 labels on the form, and command names lblyu0 to lblyu9, and their CAPTION attributes are set to "Huan", "Welcome", "Light", "Lin", "I", " ",", "," People "," Lord "," Page ", then join a timer, add a timer, and encodes the timer:</p> <p><script language = "vbscript"></p> <p><! -</p> <p>DIM A (9)</p> <p>Set a (0) = lblyu0</p> <p>... (omit)</p> <p>Set a (9) = lblyu9</p> <p>SUB TMRLBL_TIMER ()</p> <p>For i = 0 TO 9</p> <p>A (i) .foreColor = RGB (255 * RND, 255 * RND, 255 * RND)</p> <p>NEXT</p> <p>End Sub</p> <p>-></p> <p></ script></p> <p><script language = VBScript></p> <p></ script> Of course, if you do not need an array, you can implement it, but you should write a lot of code, and it is inconvenient to debug.</p> <p>six. to sum up</p> <p>I have repeatedly mentioned the use of FrontPage many times, it is indeed a good stuff, we can use it easy to insert the control, and you can implement the writing of the VBScript scripting language. If you practice, you will definitely make you more than half of the effect .</p> <p>We have already browsed the content of VBScript's content, which allows you to try your hand online. Of course, if you want to be a real master, this is not enough, but also continue "deep".</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-31472.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="31472" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.049</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'oH_2FVT2OiSyujy3_2B_2BFeFB9Xn53ZXODebTkCTThku1bNsa72Dwj5Qpc3CrAMtOE_2Fxfo744MAQgJ58npOfrd3Pgdg_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>