Upon Clicking on the button a message box with a message "Hello World" is displayed to the user.Īs you begin to work more extensively with VBScript, you will likely find that there are cases, where you are reusing identical VBScript code on multiple pages of a site. It will produce the following result − Hello World message with a 'Say Hello' button. You can put your VBScript code in and section altogether as follows − In this case, you would not have any function defined using VBScript − If you need a script to run as the page loads so that the script generates content in the page, the script goes in the portion of the document. Upon clicking on the Button, the message box is displayed to the user with the message "Hello World". It will produce the following result − A button with the name SayHello. If you want to have a script run on some event, such as when a user clicks somewhere, then you will place that script in the head as follows − In the following section, we will see how we can put VBScript in different ways − VBScript in. Script in an external file and then include in. But the most preferred way to include VBScript in your HTML file is as follows − There is a flexibility given to include VBScript code anywhere in an HTML document.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |