请问一下这个语句有什么问题?

barrytam 2002-06-05 10:04:24
<script language="VBScript" type="text/VBScript">
Msgbox "yes or no?",32+vbYesNo,""
</script>
if vbYes then temp=Rs(3).value end if
if vbNo then temp=Rs(4).value end if
但是我每次运行时无论按那个那个按钮temp都为Rs(4).value
请问这是为什么?
...全文
38 14 打赏 收藏 转发到动态 举报
写回复
用AI写文章
14 条回复
切换为时间正序
请发表友善的回复…
发表回复
hnny 2002-06-06
  • 打赏
  • 举报
回复
<script language="VBScript" type="text/VBScript">
rtValue=(Msgbox "yes or no?",32+vbYesNo,"")
if rtValue= vbYes then temp=Rs(3).value
if rtValue= vbNo then temp=Rs(4).value
</script>
zhpfaff 2002-06-06
  • 打赏
  • 举报
回复
你要做什么,是在客户端来判断吗?如果是那选择后就得提交。
<script language="VBScript" >
rtValue=(Msgbox "yes or no?",32+vbYesNo,"")
if rtValue= vbYes then temp=<%=Rs(3).value%>
if rtValue= vbNo then temp=<%=Rs(4).value%>
</script>
julyclyde 2002-06-06
  • 打赏
  • 举报
回复
你们的msgbox都没加括号
CTBOK 2002-06-05
  • 打赏
  • 举报
回复
你们有没有搞错啊,服务器的和客户端也不分分,就教别人错的方法!
sjf331 2002-06-05
  • 打赏
  • 举报
回复
vbyes返回6。vbno返回7。
<script language="VBScript" type="text/VBScript">
rtValue=Msgbox ("yes or no?",32+vbYesNo,"")
if rtValue= 6 then temp=Rs(3).value end if
if rtValue= 7 then temp=Rs(4).value end if
</script>
写错了。sorry

sjf331 2002-06-05
  • 打赏
  • 举报
回复
vbyes返回6。vbno返回7。
<script language="VBScript" type="text/VBScript">
rtValue=(Msgbox "yes or no?",32+vbYesNo,"")
if rtValue= 6 then temp=Rs(3).value end if
if rtValue= 7 then temp=Rs(4).value end if
</script>
qiushuiwuhen 2002-06-05
  • 打赏
  • 举报
回复
客户端脚本和服务端脚本不能混淆
VBS:Msgbox
ASP:Rs(i).value
richard_ouyang 2002-06-05
  • 打赏
  • 举报
回复
<script language="VBScript" type="text/VBScript">
rtValue=(Msgbox "yes or no?",32+vbYesNo,"")
if rtValue= vbYes then temp=Rs(3).value end if
if rtValue= vbNo then temp=Rs(4).value end if
</script>
gzj0815 2002-06-05
  • 打赏
  • 举报
回复
去掉两个end if吧?
zyhowe 2002-06-05
  • 打赏
  • 举报
回复
rtValue=Msgbox("yes or no?",32+vbYesNo,"")
if rtValue= vbYes then temp=Rs(3).value end if
if rtValue= vbNo then temp=Rs(4).value end if
topikachu 2002-06-05
  • 打赏
  • 举报
回复
rtValue=(Msgbox "yes or no?",32+vbYesNo,"")
if rtValue= vbYes then temp=Rs(3).value end if
if rtValue= vbNo then temp=Rs(4).value end if
micher_yan 2002-06-05
  • 打赏
  • 举报
回复
代码不全,看不明白啊,
zp820705 2002-06-05
  • 打赏
  • 举报
回复
<script language="VBScript" type="text/VBScript">
rtValue=(Msgbox "yes or no?",32+vbYesNo,"")
if rtValue= vbYes then temp=Rs(3).value end if
if rtValue= vbNo then temp=Rs(4).value end if
</script>
julyclyde 2002-06-05
  • 打赏
  • 举报
回复
if rtValue=vbyes
if rtValue=vbNO
不就行了

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧