Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs xml网格不适用于chrome、safari、mozilla firefox,但适用于IE?_Extjs_Sencha Touch_Xml Parsing - Fatal编程技术网

Extjs xml网格不适用于chrome、safari、mozilla firefox,但适用于IE?

Extjs xml网格不适用于chrome、safari、mozilla firefox,但适用于IE?,extjs,sencha-touch,xml-parsing,Extjs,Sencha Touch,Xml Parsing,我曾在一个应用程序中使用extjs,但当我验证了一些示例(如XMLGrid)时,我发现它在chrome和上面提到的一些其他浏览器中不起作用,但在ie中工作良好 你能帮我解决这个问题吗……这是代码……以防万一 Ext.onReady(function(){ var store = new Ext.data.Store({ url: 'http://dev.sencha.com/deploy/dev/examples/grid/sheldon.xml',

我曾在一个应用程序中使用extjs,但当我验证了一些示例(如XMLGrid)时,我发现它在chrome和上面提到的一些其他浏览器中不起作用,但在ie中工作良好

你能帮我解决这个问题吗……这是代码……以防万一

Ext.onReady(function(){

    var store = new Ext.data.Store({

        url: 'http://dev.sencha.com/deploy/dev/examples/grid/sheldon.xml',
        reader: new Ext.data.XmlReader({
               record: 'Item',
               id: 'ASIN',
               totalRecords: '@total'
           }, [
               {name: 'Author', mapping: 'ItemAttributes > Author'},
               'Title', 'Manufacturer', 'ProductGroup'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Author", width: 120, dataIndex: 'Author', sortable: true},
            {header: "Title", width: 180, dataIndex: 'Title', sortable: true},
            {header: "Manufacturer", width: 115, dataIndex: 'Manufacturer', sortable: true},
            {header: "Product Group", width: 100, dataIndex: 'ProductGroup', sortable: true}
        ],
        renderTo:'example-grid',
        width:540,
        height:200
    });

    store.load();
});
它的html文件是:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>XML Grid Example</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />

  <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
    <script type="text/javascript" src="../../ext-all-debug.js"></script>
    <script type="text/javascript" src="xml-grid.js"></script>

<link rel="stylesheet" type="text/css" href="grid-examples.css" />
<link rel="stylesheet" type="text/css" href="../shared/examples.css" />

</head>
<body>
<script type="text/javascript" src="../shared/examples.js"></script>
<h1>XML Grid Example</h1>

<div id="example-grid"></div>

</body>
</html>

XML网格示例
XML网格示例

Firefox、Chrome和Safari可能会阻止您的JavaScript调用'http://dev.sencha.com/deploy/dev/examples/grid/sheldon.xml"

将XML下载到您的计算机中,并调整存储声明中的URL。

这是因为。请仔细阅读,以便更好地解释