Chrome浏览器报错:Origin null is not allowed by Access-Control-Allow-Origin.

问题:Chrome浏览器报错:Origin null is not allowed by Access-Control-Allow-Origin.

原因:.js文件中使用load()方法,而Chrome浏览器出于安全起见,不允许load本地文件。

方法:给Chrome添加启动参数--allow-file-access-from-files。

步骤:右击Chrome浏览器快捷方式,选择“属性”,在“目标”中加上"--allow-file-access-from-files",注意前面有个空格,再重启Chrome浏览器便可。

时间: 2024-07-29 08:53:11

Chrome浏览器报错:Origin null is not allowed by Access-Control-Allow-Origin.的相关文章

关于Uncaught SyntaxError: Unexpected token o in JSON at position 1,chrome持续报错的相关解析

今天跟大家分享我前两天遇见的一个BUG,说出来很难受,因为这个BUG花了我一个多小时去找原因,后来莫名其妙的故障消失了,强迫症犯了的我,居然花了2个多小时去故意再制造这个BUG,只想弄明白WHY???结果大家应该都猜到了,哈哈,没找到!!!没错,居然没找到!!!不过类似于Uncaught SyntaxError: Unexpected token ' in JSON at position 2的错误... 关于JOSN的方法,大家通过百度应该都深刻理解它的用法:parse用于从一个字符串中解析出

webdriver调用ie浏览器报错

webdriver调用ie浏览器报错: org.openqa.selenium.NoSuchWindowException: Unable to find element on closed 解决方法: System.setProperty("webdriver.ie.driver", "C:\\Users\\ssatyanarayana\\Downloads\\IEDriverServer.exe"); // opening the IE with recomen

Windows 7上打开IE浏览器报错:无法启动此程序,因为计算机中丢失api-ms-win-core-path-|1-1-0.dll。尝试重新安装该程序以解决此问题。

Windows 7上打开IE浏览器报错: 1. 重新安装IE11也没有解决该问题 2. 在其他Win7电脑也搜索不到该文件,但是能使用IE浏览器. 3. 从网上找了一个dll文件,注册时提示如下图

ie7/8浏览器报错:对象不支持“trim”属性或方法

解决方法: 方法1: 使用jquery里面的全局函数$.trim()代替原生js方法trim(): $.trim( 你要替换的字符 ); 方法2: Function.prototype.method = function (name, func) { this.prototype[name] = func; return this; }; if (!String.prototype.trim) { //判断下浏览器是否自带有trim()方法 String.method('trim', funct

edge浏览器报错 "*this*" is not defined

测试页面的时候发现一个很奇怪的问题,页面在谷歌,ie跑都没有问题,可是在edge浏览器却出现一个很奇怪的错误.详细的错误信息如下: [Vue warn]: Property or method "*this*" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for cl

Apache(httpd) 报错You don't have permission to access /on this server.

项目需要,增加个访问端口,指向不同目录. 但是一直报"You don't have permission to access /on this server."错误 配置文件语法检查: #/etc/init.d/httpd configtest 或 apachectl -t 直接输入:/etc/init.d/httpd 会新显示选项 [[email protected] ~]# /etc/init.d/httpd  Usage: httpd {start|stop|restart|co

启动wamp报错 You don't have permission to access / on this server

安装完wamp之后,安装网上的教程设置虚拟路径,出现了问题,同样的问题由不同的原因导致. 1.httpd.conf中添加Listen 相应的端口,我的是8080 2.httpd.conf去掉Include conf/extra/httpd-vhosts.conf前面的#. 3.然后调用localhost,就出现下面的错误: Forbidden You don't have permission to access /on this server. 解决方法:在conf\extra下面的httpd

安装wamp后,localhost访问报错“You don't have permission to access / on this server.”

今天装了一个wamp,在本地测试了一下,发现使用http://localhost/报错403,提示内容如下:"You don't have permission to access / on this server.".用127.0.0.1访问正常,phpMyAdmin也是同样的问题. 在网上搜索了一下有很多都是出现这个问题,但是不是不详细就是没找到解决办法.在此做一下记录,我是安装一路下一步所以安装目录都是默认的. 首先修改Apache,在wampserver下左键,Apache下有

wamp报错You don't have permission to access on this server

打开httpd.conf  将<Directory /> </Directory>的内容替换成 Options FollowSymLinksAllowOverride NoneOrder deny,allowDeny from all 也就是 <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all</Directory> vhost配置: &