标题:白痴新手请教下 如题为什么没对话框?
只看楼主
k449534618
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2011-7-10
结帖率:100%
已结贴  问题点数:10 回复次数:2 
白痴新手请教下 如题为什么没对话框?
<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>
搜索更多相关主题的帖子: 对话框 
2011-07-11 14:41
towering
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:1
帖 子:261
专家分:507
注 册:2007-10-9
得分:5 
是的,ASP的InputBox是没有对话框的

我的ASP小站:http://www./
2011-07-11 15:02
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
得分:5 
回复 楼主 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> 
注意换行和空格
2011-07-11 15:37



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-345222-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.177243 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved