

In this example, the function sample will be called when the page's Load Event occurs. Later we can call these functions using the tag's attributes like OnClick, OnMouseMove, OnMouseUp etc. Then I will take this value and send it to Zabbix (monitoring tool), using its agent.
#VBSCRIPT HTML EXAMPLES CODE#
If you want to execute a certain piece of code for certain events, you can create the functions in vb script and you should place this inside the and tags. vbs file, which I will open manually, and as the result it must show (2302) from this table.

Events are occurred when the user does some action. ĭocument.write("Hi, this is called using script while the page is loading")Įvents are user generated actions like mouse click, mouse move, key press in the keyboard. If you want use the VB Script while the page is loading, you can place the VB code inside the and. The VBScript can be executed immediately, or at a later event using function call. Using function call (by placing code inside the ) While the page is loading (by placing code along with the content)Ģ. Writing HTML using VBScript Variables Create a variable Insert a variable value in a text Create an array Procedures Sub procedure Function procedure Conditional Statements If.Then.