【运行错误】Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.
代码如下:
- <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访问就行。
【运行错误】Uncaught DOMException: Blocked a frame with origin "null" from accessing a cross-origin frame.的更多相关文章
- Uncaught DOMException: Blocked a frame with origin "http://localhost
ajaxFileUpload上传时报错 :Uncaught DOMException: Blocked a frame with origin "http://localhost..... ...
- 跨域打开页面:Uncaught DOMException: Blocked a frame with origin
Uncaught DOMException: Blocked a frame with origin 使用postMessage()方法可以解决跨域传值的问题 Api: https://develop ...
- iframe跨域问题:Uncaught DOMException: Blocked a frame with origin解决方法
在前后端分离的情况下,前台页面将后台页面加载在预留的iframe中:但是遇到了iframe和主窗口双滚动条的情况,由此引申出来了问题: 只保留单个滚动条,那么就要让iframe的高度自适应,而从主页面 ...
- 跨域问题 Uncaught DOMException: Blocked a frame with origin。。。
第三方系统内嵌 到iframe中的 跨域问题. 解决方案: http://www.ruanyifeng.com/blog/2016/04/same-origin-policy.html
- iframe框架自适应高度 uncanght SecurityError: Blocked a frame with origin "null" from accessing a frame ....
来源于crm项目的contact/edit.html 一.背景是这样的 最近在做crm系统的前端页面,有一个页面呢,点击“查看全部信息”时会弹出,这个弹窗里面又有分页导航,分页不是使用ajax 异步刷 ...
- Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported
Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may no ...
- 【chrome错误】Cross origin requests are only supported for protocol schemes: http, data,chrome-extension, https, chrome-extension-reso
使用ajax请求本地文件,chrome会报跨域错误. XMLHttpRequest cannot loadfile:///C:/Users/Li/Desktop/images/alist.json.C ...
- 解决 canvas 将图片转为base64报错: Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasEleme...
问题描述 当用户点击分享按钮时,生成一张海报,可以保存图片分享到朋友圈,用户的图片是存储在阿里云的OSS,当海报完成后,执行.canvas.toDataURL("image/png" ...
- 使用wpaint绘图软件时:Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The image argument is a canvas element with a width or height of 0.
使用wpaint绘图软件时:Uncaught DOMException: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': Th ...
随机推荐
- Balanced Lineup---poj3264线段树基础
题目链接 求对应区间最大值与最小值的差: #include<stdio.h> #include<string.h> #include<algorithm> #inc ...
- Python-OpenCV —— 基本操作详解
OpenCV是一个基于BSD许可(开源)发行的跨平台计算机视觉库,可以运行在Linux.Windows.MacOS操作系统上.它轻量级而且高效——由一系列 C 函数和少量C++类构成,同时提供了Pyt ...
- mysql 操作sql语句 操作数据表中的内容/记录
#3. 操作文件中的内容/记录 往哪张表去插入 insert into 表名指定字段(id,name) 插入要加values(针对前面字段插入)(2,mike); insert into t1(id, ...
- rplidar跑cartographer
一.Cartographer编译 cartographer依赖的大型第三方库很少,编译时基本没有依赖项问题,基本按照官方文档的步骤来,略作修改.使用的环境是Ubuntu16.04+ROS Kineti ...
- 十天精通CSS3(11)
Media Queries——媒体类型(一) 随着科学技术不断的向前发展,网页的浏览终端越来越多样化,用户可以通过:宽屏电视.台式电脑.笔记本电脑.平板电脑和智能手机来访问你的网站.尽管你无法保证一个 ...
- 远程调用Spark平台中的程序
用scala语言,开发好了在spark平台上可以一直运行的机器学习模型 现在有个需求: 要远程调用该模型的一些方法并获取结果 那么可以使用jetty在服务器端主节点占用一个端口然后对外提供http服务 ...
- break continue练习
break :跳出 1.当break单独存在时,下面不要定义其他语句,因为执行不到. 2.如果出现了循环嵌套,break响应跳出指定的循环,可以通过标号来完成 例如: continue:要么是swit ...
- python处理图片验证码
WebDriver中实现对特定的Web区域截图方法 import pytesseract from PIL import Image image=Image.open('new.jpg') vcode ...
- linux命令:linux文件处理命令
命令格式 : 命令 [-选项] [参数] 例:ls -la /etc 说明:1)个别命令使用不遵循此格式,[]代表可选 2)当有多个选项时,可以写在一起 3)-a等于 --all,调用简化选项用 ...
- 面试官说:说一说CommonJs的实现原理
其实刚看到这个题目的时候,我的内心是拒绝的,但是本着对科学的敬畏精神,我开始了 CommonJs 的探索之路. 来来来奉上我这几天的心血,拿走不客气.如有错误欢迎指正,共同进步. 提到CommonJs ...