回 帖 发 新 帖 刷新版面

主题:请进来帮忙看下,那里出了问题。

[b]<html>
<head>
<title>Sub 和 Function</title>
<script language="vbscript">
<!--
    ConvertT
    Sub ConvertT()
        temp=InputBox("请输入华氏温度。","过程调用示例")
        If temp=Empty Them Exit Sub
          cDegree=Int(Celsius(temp)*100)/100
          MsgBox"华氏"&temp&"转换为摄氏" & cDegree & "度."
    End Sub
    Function Celsius(fDegree)
        Celsius=(fDegree-32)*5/9
    End Function
-->
</script>
</head>
<body>

</body>
</html>
这个程序在浏览器上不能显示,请问那里出了问题?[/b]

回复列表 (共2个回复)

沙发


一.temp=InputBox("请输入华氏温度。","过程调用示例")

这里的,(逗号)应为英文逗号:,

二.If temp=Empty Them Exit Sub

这里的them错了,是then

板凳

多谢了

我来回复

您尚未登录,请登录后再回复。点此登录或注册