<html>
<head>
<Script language="VBScript">
Sub lstChr()
MsgBox "1111",0,"精确查询"
End Sub
Sub lstChange()
MyVar = MsgBox ("Hello World!", 65, "MsgBox 例子")
End Sub
Sub ConvertTemp()
temp = InputBox("请输入华氏温度。", 1)
MsgBox "温度为 " &
Celsius(temp) &
" 摄氏度。"
End Sub
Function Celsius(fDegrees)
Celsius = (fDegrees - 32) * 5 / 9
End Function
</Script>
<title>New Page 1</title>
</head>
<body>
<input type="button" value="按钮" name="B2" OnClick="lstChr">
<input type="button" value="按钮" name="B3" OnClick="lstChange()">
<input type="button" value="按钮" name="B4" OnClick="ConvertTemp()">
</body>
</html>
注意“lstChr”和“lstChange”的不同:是否要将返回值赋给某一个变量