COMPUTER LANGUAGES HTML,C,C++.JAVA,.NET AND MULTIMEDIA basics and programs click home button
VB SCRIPT IN <BODY> AND <HEAD> SECTION
VBScript in <body> and <head> Sections
You can put your VBScript code in <head> and <body> section altogether as follows:
<html>
<head>
<script type="text/vbscript">
<!--
Function sayHello()
msgbox("Hello World")
End Function
//-->
</script>
</head>
<body>
<script type="text/vbscript">
<!--
document.write("Hello World")
//-->
</script>
<input type="button" onclick="sayHello()" value="Say Hello" />
</body>
</html>
It will produce the following result: Hello World message with a 'Say Hello'
button. Upon Clicking on the button a message box with a message "Hello World" is displayed to the user.
No comments:
Post a Comment