asp弹出对话框急跳转的问题

来源:百度知道 编辑:UC知道 时间:2024/05/17 05:24:05
比如一个登陆页面 在b.asp中判断a.asp中的uesrid 是否为空。
为空弹出对话框,在点完对话框上的“确定”按钮以后
跳转回a.asp页面 ,请问怎么实现!!

<%
if request.form("userid")="" then
response.write "<script>alert('用户名没有填写!');location='a.asp';</script>"
response.end
end if
%>

'给你一个很好用的函数:Redirect
'strWord 提示框信息
'strUrl 跳转的网址
    Sub Redirect(ByVal strWord, ByVal strUrl)
        If strWord > "" or strUrl > "" Then
            Response.Write "<script type=""text/javascript"">" & vbNewLine
            If strWord > "" Then
                Response.Write "window.alert('" & strWord & "');" & vbNewLine
     &