注册 登录
编程论坛 ASP技术论坛

白痴新手请教下 如题为什么没对话框?

k449534618 发布于 2011-07-11 14:41, 287 次点击
<html>
<head>
<title>对话框</title>
</head>
<body>
<script language="VBScript">
sub show
Dim age
age=InputBox("请输入某位先生的年龄:", "输入年龄", "36")
if age>30 then
msgBox"年龄超过30啦……"
else
msgBox"年龄小于30啊……"
end if
if age>30 then document.Write("年龄超过30啦……") else document.Write("年
龄小于30啊……")
end sub
call show
</script>
</body>
</html>
2 回复
#2
towering2011-07-11 15:02
是的,ASP的InputBox是没有对话框的
#3
yms1232011-07-11 15:37
回复 楼主 k449534618
程序代码:
<html>
<head>
<title>对话框</title>
</head>
<body>
<script language="VBScript">
sub show

 Dim age

 age=InputBox("请输入某位先生的年龄:", "输入年龄", "36")

 if age>30 then
    msgBox "年龄超过30啦……"

 else
    msgBox "年龄小于30啊……"

 end if

 if age>30 then
    document.Write "年龄超过30啦……"

 else
    document.Write "年龄小于30啊……"

 end if
end sub
call show
</script>
</body>
</html>
注意换行和空格
1