以文本方式查看主题 - Foxtable(狐表) (http://www.foxtable.com/bbs/index.asp) -- 专家坐堂 (http://www.foxtable.com/bbs/list.asp?boardid=2) ---- 求助 (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=136505) |
-- 作者:巷弄太过弯曲 -- 发布时间:2019/6/14 16:40:00 -- 求助 老师,我有两张网页,一长是登入界面 a.htm 一张是登入后首页 b.htm,请问怎么判断代码使我打开b.htm,如果检测到没有登录用户密码的Cookies值,就自动跳转到a.htm Dim Verified As Boolean \'用于标记用户是否通过了身份验证
Dim UserName As String = e.Cookies("username") \'从cookie中获取用户名 Dim Password As String = e.Cookies("password") \'从cookie中获取用户密码 |
-- 作者:有点甜 -- 发布时间:2019/6/14 17:21:00 -- 参考
If e.path = "b.htm" then msgbox(123) Dim UserName As String = e.Cookies("username") \'从cookie中获取用户名 If username = nothing then msgbox(456) wb.InsertHTML("<meta http-equiv=\'Refresh\' content=\'0; url=/a.htm\'>") \'那么直接跳转到登录页面 End If End If |