window.location.href="login.jsp?backurl="+window.location.href;
第二种:
alert("返回");
window.history.back(-1);
第三种:
window.navigate("top.jsp");
第四种:
self.location='top.htm';
第五种:
alert("非法访问!");
top.location='xx.jsp';
2.javascript:指的是伪协议,是指用url的形式调用javascript
这句话相当于调用了javascript方法jump(“https://www.wendangku.net/doc/3418782423.html,”);
3.另外摘自网友的描述:
关于js中"window.location.href"、"location.href"、
"parent.location.href"、"top.location.href"的用法
"window.location.href"、"location.href"是本页面跳转
"parent.location.href"是上一层页面跳转
"top.location.href"是最外层的页面跳转
举例说明:
如果A,B,C,D都是jsp,D是C的iframe,C是B的iframe,B是A的iframe,如果D中js这样写
"window.location.href"、"location.href":D页面跳转
"parent.location.href":C页面跳转
"top.location.href":A页面跳转
如果D页面中有form的话,