window.location跳转页面
生活随笔
收集整理的这篇文章主要介绍了
window.location跳转页面
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
关于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的话,
<form>: form提交后D页面跳转
<form target="_blank">: form提交后弹出新页面
<form target="_parent">: form提交后C页面跳转
总结
以上是生活随笔为你收集整理的window.location跳转页面的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 生成随机验证码
- 下一篇: 文件系统写入100G文件需要多久