我的项目在d盘,然后用的arcgis api for JavaScript,又下载了个gridx模块,都放在了IIS对应的位置,位置都对,调试的时候因为webstorm会自己生成一个域,就导致和IIS下的不是同源了,网上说的在谷歌浏览器快捷方式里加--allow-file-access-from-files,试过了,不管用。用IE8调试没问题,IE8好像允许跨域,求解决方法,错误和源码如下,错误是分别在谷歌和火狐中的。没有钱,所以没办法悬赏,只求大牛帮忙
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>gridx test</title>
<link rel="stylesheet" href="http://localhost/arcgis_js_api/library/3.18/3.18/gridx/resources/claro/Gridx.css">
<script src="http://localhost/arcgis_js_api/library/3.18/3.18/dojo/dojo.js"></script>
</head>
<body>
<div id="gridContainer"></div>
<script type="text/javascript">
require(["dojo/parser", "dojo/store/Memory", "gridx/Grid", "gridx/core/model/cache/Sync", "dojo/domReady!"],
function (parser, Memory, Grid, Cache){
parser.parse();
var store = new Memory({
data: [
{ id: 1, name: 'John', score: 130, city: 'New York', birthday: '1980/2/5'},
{ id: 2, name: 'Alice', score: 123, city: 'Washington', birthday: '1984/3/7'},
{ id: 3, name: 'Lee', score: 149, city: 'Shanghai', birthday: '1986/10/8'},
{ id: 4, name: 'Mike', score: 100, city: 'London', birthday: '1988/8/12'},
{ id: 5, name: 'Tom', score: 89, city: 'San Francisco', birthday: '1990/1/21'}
]
});
var structure = [
{ id: 'name', field: 'name', name: 'Name', width: '50px'},
{ id: 'city', field: 'city', name: 'City'},
{ id: 'score', field: 'score', name: 'Score', width: '80px'}
];
//Create grid widget.
var grid = Grid({
id: 'grid',
cacheClass: Cache,
store: store,
structure: structure
});
//Put it into the DOM tree. Let's assume there's a node with id "gridContainer".
grid.placeAt('gridContainer');
//Start it up.
grid.startup();
});
</script>
</body>
</html>