这个VBScript怎么老是运行不了
xfga 2005-08-14 08:38:34 <html>
<head>
<title>优惠价计算</title>
</head>
<body>
<h3>优惠价计算</h3><hr>
所购商品总全额:
<input type=text name=text1 size=10>元
<input type=button name=button1 value=计算>
<script for=button1 event=onclick language=vbscript>
x=text2.value
If Not IsNumeric(x) then msgbox("您输入的不是数值数据!"):Exit Sub
If x<1000 then y=x
ElseIf x<2000 then y=0.95*x
ElseIf x<3000 then y=0.9*x
ElseIf x<5000 then y=0.85*x
Else y=0.8*x
End If
msgbox "优惠价为:"&y&"元"
</script>
</body>
</html>