第六章 VBScript语言
第一节 VBScript简介
VBScript是微软编程语言Visual Basic家族中的一个成员。熟悉Visual Basic的编程,对于熟悉VBScript将会很有帮助。
VBScript程序可以写在网页的<head></head>里和网页的<body></body>里。
现在我们就写一个简单的 VBScript 的例子。
<html>
<head><title>一个简单的VBScript代码示例</title></head>
<body>
<p>你会看到一个消息框,在此行文字显示之后弹出。</p>
<script type="text/vbscript">
MsgBox("Hello,World!")
</script>
</body>
</html>
以下是将VBScript代码放在Head中的示例:
<html>
<head>
<title>VBScript代码放在Head中的示例</title>
<script type="text/vbscript">
MsgBox("Hello,World!")
</script>
</head>
<body>
<p>在此行文字之前显示,你看到了一个消息框。</p>
</body>
</html>