当前位置:编程学习 > asp >>

请帮忙解决一个ASP里 MSGBOX的问题

<%
dim mz,gs,userSure
mz = request("txtName")
gs = request("txtCompty")



if userSure then
response.Write("你注册已经成功,用户是:" & mz & "公司来自" & gs )
else
response.Write("<a href=a.asp?txtName=" & mz & "&txtCompty=" & gs & ">返回修改</a>")
end if

%>


代码如上,我的问题是,里面有个服务器端变量userSure ,我想通过response.write输出一个msgbox,这个MSGBOX弹出一个窗口问用户是还是否,并且把变量给userSure 获取。
但是例如 a = msgbox() 这个a是写到客户端代码去了,我如何在服务器端获取。这个问题有点白痴,就是实现不了效果,请帮忙。
答案:
可以这样试试

response.Write "<script type='text/javascript'>"
response.Write " if(confirm('您确定吗?'))
response.Write "window.location='a.asp?userSure=1';"
response.Write "else"
response.Write "window.location='a.asp?userSure=0';"
response.Write "</script>"

上一个:asp.net开发中xml占什么样的角色
下一个:有人用ASP操作过SQLDMO.sqlserver吗?求教。。

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,