Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
来源:互联网 发布:淘宝开个什么店赚钱 编辑:程序博客网 时间:2024/06/05 19:27
代码如下:
<html><head><script>/*window.frames[]可以通过下标或名称访问单独的frame*/window.onload=function(){var h1=window.frames["header"];//.document.getElementsByTagName('h1');alert(h1);}</script></head><frameset rows="80,*"><frame src="top.html" name="header"></frame><frameset cols="180,*"><frame src="menu.html" name="menu"></frame><frame src="main.html" name="main"></frame></frameset></frameset></html>
原因:跨页面操作涉及域的概念(origin),错误的意思是:未捕获的安全错误:阻止了一个域为null的frame页面访问另一个域为null的页面。代码运行时在本地直接用浏览器打开的,地址栏是file:///的页面,只需改为localhost访问就行。
2 0
- Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
- Blocked a frame with origin "null" from accessing a cross-origin frame.
- Spring boot文件上传blocked a frame with origin "http://xxx" from accessing a cross-origin frame.
- iframe子页面调用父页面方法 跨域 异常 Blocked a frame with origin
- Image from origin 'http://bubuol.com' has been blocked from loading by Cross-Origin Resource Sharing
- A Parser-blocking, cross-origin script is invoked via document.write. This may be blocked by the bro
- <学习笔记>浏览器跨域报错:cannot be created in a document with origin 'null'
- 第四章 A Frame with a View
- frame.origin.x 的意思和作用?
- frame.origin.x 的意思和作用?
- IOS 中frame bounds origin的区别
- frame.origin.x 的意思和作用?
- frame bounds center origin contentSize contentOffset contentInset
- frame.origin.x 的意思和作用?
- the 'access-control-allow-origin' header has a value 'http://localhost' but origin is null
- 【Log历练手册】Frame must be terminated with a null octet
- 关于计算控件Frame和origin的扩展方法
- Cross-Origin Resource Sharing
- file,js图片预览
- linux 安装mysql
- huffman编解码算法实验与压缩效率分析
- jstorm kafka插件使用案例
- 集合框架
- Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
- Spring Boot <一> 初识了解
- NYOJ 63 小猴子下落
- 链表2:链表中倒数第k个结点
- react-native 填坑之Image "unexpected character"
- Android Studio 项目断开SVN连接
- python正则表达式系列(5)——零宽断言
- 模拟实现strlen,strcpy,strcmp,strcat,strstr库函数
- LeetCode刷题(C++)——Binary Tree Level Order Traversal(Normal)