报错提示如下:

XMLHttpRequest cannot load http://www.xxxx.com/264/Data/GetScreenInfo. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access. 

今天需要做一个本地测试,html中的js效果涉及跨域拉取数据的问题,Chrome报错并拒绝数据的提取,,,,

有一个便捷的处理方式可以在谷歌中实现数据跨域,只需要简单为浏览器键入一个值 --disable-web-security (这个值前有空格哦O(∩_∩)O~)后点击确定。

如下图:

Tip:首先重启浏览器,再打开需要测试的文档即可。

查看链接:

CORS(跨域资源共享) http://www.360doc.com/content/14/0106/11/15643_343005039.shtml

新W3C标准中 AJAX 跨域实现以及隐患 http://huaidan.org/archives/2729.html

跨域访问资源 http://technet.microsoft.com/zh-cn/sqlserver/e36ceae6-ff36-4a1b-9895-75f0eacfe94c

Chrome报错:跨域问题处理( Access-Control-Allow-Origin)_ 用于本地测试的快捷解决方法的更多相关文章

  1. 相对路径获取项目文件 及报错 No mapping found for HTTP request with URI XXX in DispatcherServlet with name ‘springmvc’解决方法

    首先一点,WebRoot目录下的文件是都可以通过浏览器输入路径,直接读取到的 例如这样: 而WebRoot下面WEB-INF是无法浏览器输入路径直接读取的. 因为是受保护的. 如果jsp读取一个图片的 ...

  2. mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法

    1. 问题背景         InnoDB是新版MySQL(v5.5及以后)默认的存储引擎,之前版本的默认引擎为MyISAM,因此,低于5.5版本的mysql配置文件.my.cnf中,关于InnoD ...

  3. MyEclipse报错 Building workspace has encountered a problem Errors occurred during the build 的2种解决方法

    1: Building workspace has encountered a problem Errors occurred during the build 如果报错这个 那么有可能是jar包,报 ...

  4. Vue报错:Uncaught TypeError: Cannot assign to read only property’exports‘ of object’#<Object>‘的解决方法

    发现问题 运行一下以前的一个Vue+webpack的 vue仿新闻网站  小项目,报错 由于自己vue学习不深入,老是这个报错,找了好久(确切的说是整整一下午^...^)才找到原因 -v- Uncau ...

  5. 【MySQL笔记】mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法

    step1:查看 1.1 Mysql命令行里输入"show engines:"查看innoddb数据引擎状态, 1.2 show variables "%_buffer% ...

  6. node.js报错throw err; // Rethrow non-MySQL errors e:\serverTest\node_modules\mysql\lib\protocol\Parser.js:79 解决方法

    今天在用node+angular做后台时,需要使用session保存登陆状态的时候,遇到了此问题,问题直译为非mysql问题,我也在后台取到的登陆用户名和密码,确实不是数据库问题.最后发现在使用ses ...

  7. 报错:/BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.29.5/UITableView.m:7943解决方法

    环境:Xcode7.1.1 详细错误: *** Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], ...

  8. eclipse报错:Multiple annotations found at this line: - String cannot be resolved to a type解决方法实测

    Multiple annotations found at this line:- String cannot be resolved to a type- The method getContext ...

  9. Maven报错Please ensure you are using JDK 1.4 or above and not a JRE解决方法!

    https://www.cnblogs.com/shihua513/p/6163682.html 在eclipse下用maven编译时,很有可能出现以下错误: Please ensure you ar ...

随机推荐

  1. 迷你MVVM框架 avalonjs 1.4发布

    主要带来以下三大改进: 全新的兼容AMD规范requirejs API的加载器 使用gulp进行构建 兼容性更好的触屏模块 最近还修改了avalon.modern bind方法的BUG,自定义过滤器的 ...

  2. urllib 和urllib2 模块使用简例

    一.最简单的使用 import urllib,urllib2 response = urllib2.urlopen("https://www.baidu.com") print r ...

  3. 【Java】JVM(五)、虚拟机类加载机制

    一.概念 类加载:虚拟机把类的数据从Class文件加载到内存中,并对数据进行校验,转化解析,和初始化,最终形成可以被虚拟机直接使用的Java类型. 二.加载时机 1.加载 加载阶段虚拟机完成的工作为: ...

  4. Extending Conductor

    后端 导体提供了可插拔的后端.目前的实现使用Dynomite. 每个后端需要实现4个接口: //Store for workflow and task definitions com.netflix. ...

  5. 导出 java.io.IOException: 权限不够

    项目原先都是开发使用root账号登陆服务器,人肉部署. 今天改成了自动部署,部署之后发现导出用不了了,查看服务器日志提示: 查看项目启动用户是app,推断是app用户的权限不够,导致导出无法在服务器创 ...

  6. Linux 查看当前时间

    一.查看和修改Linux的时区1. 查看当前时区命令 : "date -R"2. 修改设置Linux服务器时区方法 A命令 : "tzselect"方法 B 仅 ...

  7. 53. Maximum Subarray (Array; DP)

    Find the contiguous subarray within an array (containing at least one number) which has the largest ...

  8. js this pointer 指针

    this JavaScript的函数内部如果调用了this,那么这个this到底指向谁? 答案是,视情况而定! 如果以对象的方法形式调用,比如xiaoming.age(),该函数的this指向被调用的 ...

  9. ADF学习实用网站

    ADF中所有组件工功能例子 http://jdevadf.oracle.com/adf-richclient-demo/faces/components/dialog.jspx;jsessionid= ...

  10. 使用threejs点云秀出酷炫的图片效果(一)

    来源:http://blog.csdn.net/srk19960903/article/details/70214556 使用了点云拼凑出了照片轮播十分有趣,于是用threejs实现这个效果. 首先这 ...