>>
知识广场
JS实现页面跳转,如何实现iframe中跳转
导读:
最常用的:window.location.href、location.href是指本页面跳转parent.location.href是上一层页面跳转top.location.href是最外层的页面跳转…
最常用的:
window.location.href、location.href是指本页面跳转
parent.location.href是上一层页面跳转
top.location.href是最外层的页面跳转
top.location.href=”url” 在顶层页面打开url(跳出框架)
self.location.href=”url” 仅在本页面打开url地址
parent.location.href=”url” 在父窗口打开Url地址
this.location.href=”url” 用法和self的用法一致
if (top.location == self.location) 判断当前location 是否为顶层来 禁止frame引用 如果页面当中有自定义的frame的话,
也可以将parent self top换为自定义frame的名称 效果就是在自定义frame窗口打开url地址
相关推荐
PHP json_decode()报错 json_last_error()判断错误类型及解决方法
PHP json_decode()报错 json_last_error()判断错误类型 解决背景:最近在用curl请求接口获取json数据串的时候,一直出现PHP中json_decode()解析字符串…
2022-10-29 21:45:57 | 分类:PHP | 作者:myerob | 阅读:725 | 标签:PHP json_decode() 报错 json_last_error() 判断错误类型 解决方法 | 收藏