//=======================查看资源信息=============================//
Ext.define('strSiteName', {
extend: 'Ext.data.Model',
fields: [
{name: 'title', type: 'string'},
{name: 'keywords', type: 'string'},
{name: 'doc', type: 'string'},
{name: 'describe', type: 'string'},
{name: 'date', type: 'string'},
{name: 'author', type: 'string'},
{name: 'publisher', type: 'string'}
]
});
var store3 = Ext.create('Ext.data.Store', {
model: 'strSiteName',
proxy: {
type: 'ajax',
url:'01.jsp',
reader: {
type: 'json',
root: 'root',
}
}
});
store3.load();
// create the Grid, see Ext.
var grid2 = Ext.create('Ext.ux.LiveSearchGridPanel', {
store: store3,
region: 'center',
columnLines: true,
columns: [
{
text : 'title',
width : 175,
sortable : false,
dataIndex: 'title'
},
{
text : 'keywords',
width : 215,
sortable : true,
dataIndex: 'keywords'
},
{
text : 'describe',
width : 345,
sortable : true,
dataIndex: 'describe'
},{
text : 'doc',
width : 75,
sortable : true,
dataIndex: 'doc'
},
{
text : 'author',
width : 85,
sortable : true,
dataIndex: 'author'
}, {
text : 'publisher',
width : 85,
sortable : true,
dataIndex: 'publisher'
}, {
text : 'date',
width : 185,
sortable : true,
dataIndex: 'date'
}
],
height: 350,
width: 600,
title: 'Live Search Grid',
viewConfig: {
stripeRows: true
}
});
//======================查看资源信息结束========================//
//浏览器控制台现实的错误+返回的json数据
Uncaught ReferenceError: Ext is not defined js/bootstrap.js:1
Resource interpreted as Script but transferred with MIME type application/x-js: "chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/page_context.js". chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/page.js:853
Uncaught Unable to parse the JSON returned by the server: You're trying to decode an invalid JSON String: {success:true,totalProperty:100,root:[{"title":"0","keywords":"0","doc":"0","describe":"0","date":"0","author":"0","publisher":"0"},{"title":"1","keywords":"1","doc":"1","describe":"1","date":"1","author":"1","publisher":"1"},{"title":"2","keywords":"2","doc":"2","describe":"2","date":"2","author":"2","publisher":"2"},{"title":"3","keywords":"3","doc":"3","describe":"3","date":"3","author":"3","publisher":"3"},{"title":"4","keywords":"4","doc":"4","describe":"4","date":"4","author":"4","publisher":"4"},{"title":"5","keywords":"5","doc":"5","describe":"5","date":"5","author":"5","publisher":"5"},{"title":"6","keywords":"6","doc":"6","describe":"6","date":"6","author":"6","publisher":"6"},{"title":"7","keywords":"7","doc":"7","describe":"7","date":"7","author":"7","publisher":"7"},{"title":"8","keywords":"8","doc":"8","describe":"8","date":"8","author":"8","publisher":"8"},{"title":"9","keywords":"9","doc":"9","describe":"9","date":"9","author":"9","publisher":"9"}]}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://localhost:8080/kuaidianHoutai_0002/">
<title>My JSP '01.jsp' starting page</title>
</head>
<body>
</body>
</html>
Ext.define('strSiteName', {
extend: 'Ext.data.Model',
fields: [
{name: 'title', type: 'string'},
{name: 'keywords', type: 'string'},
{name: 'doc', type: 'string'},
{name: 'describe', type: 'string'},
{name: 'date', type: 'string'},
{name: 'author', type: 'string'},
{name: 'publisher', type: 'string'}
]
});
var store3 = Ext.create('Ext.data.Store', {
model: 'strSiteName',
proxy: {
type: 'ajax',
url:'01.jsp',
reader: {
type: 'json',
root: 'root',
}
}
});
store3.load();
// create the Grid, see Ext.
var grid2 = Ext.create('Ext.ux.LiveSearchGridPanel', {
store: store3,
region: 'center',
columnLines: true,
columns: [
{
text : 'title',
width : 175,
sortable : false,
dataIndex: 'title'
},
{
text : 'keywords',
width : 215,
sortable : true,
dataIndex: 'keywords'
},
{
text : 'describe',
width : 345,
sortable : true,
dataIndex: 'describe'
},{
text : 'doc',
width : 75,
sortable : true,
dataIndex: 'doc'
},
{
text : 'author',
width : 85,
sortable : true,
dataIndex: 'author'
}, {
text : 'publisher',
width : 85,
sortable : true,
dataIndex: 'publisher'
}, {
text : 'date',
width : 185,
sortable : true,
dataIndex: 'date'
}
],
height: 350,
width: 600,
title: 'Live Search Grid',
viewConfig: {
stripeRows: true
}
});
//======================查看资源信息结束========================//
//浏览器控制台现实的错误+返回的json数据
Uncaught ReferenceError: Ext is not defined js/bootstrap.js:1
Resource interpreted as Script but transferred with MIME type application/x-js: "chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/page_context.js". chrome-extension://cpngackimfmofbokmjmljamhdncknpmg/page.js:853
Uncaught Unable to parse the JSON returned by the server: You're trying to decode an invalid JSON String: {success:true,totalProperty:100,root:[{"title":"0","keywords":"0","doc":"0","describe":"0","date":"0","author":"0","publisher":"0"},{"title":"1","keywords":"1","doc":"1","describe":"1","date":"1","author":"1","publisher":"1"},{"title":"2","keywords":"2","doc":"2","describe":"2","date":"2","author":"2","publisher":"2"},{"title":"3","keywords":"3","doc":"3","describe":"3","date":"3","author":"3","publisher":"3"},{"title":"4","keywords":"4","doc":"4","describe":"4","date":"4","author":"4","publisher":"4"},{"title":"5","keywords":"5","doc":"5","describe":"5","date":"5","author":"5","publisher":"5"},{"title":"6","keywords":"6","doc":"6","describe":"6","date":"6","author":"6","publisher":"6"},{"title":"7","keywords":"7","doc":"7","describe":"7","date":"7","author":"7","publisher":"7"},{"title":"8","keywords":"8","doc":"8","describe":"8","date":"8","author":"8","publisher":"8"},{"title":"9","keywords":"9","doc":"9","describe":"9","date":"9","author":"9","publisher":"9"}]}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://localhost:8080/kuaidianHoutai_0002/">
<title>My JSP '01.jsp' starting page</title>
</head>
<body>
</body>
</html>
解决方案 »
- Ext.grid.EditorGridPanel表格右移问题解决方法,高手进。
- 刚刚学jquery谁帮我看看 没有效果 谢谢了
- 问两个简单的javascript问题
- 登陆小问题 给分
- JavaScript直接获取待上传文件大小等信息的一种方法
- new Array(8) 只赋1个值有问题,如何解决?
- javascript怎样触发将一张图片A换成了图片B (超级挑战) 求救
- js中怎么样才能在建立表格的时候每次点击按钮只建立一行一列元素而不是整个行或整个列
- 怎样获得光标处于那一行
- 如何用JScript来写文件?程序如下:
- 老衲今天不爽当五毛党了
- div onblur tabindex 同用,为什么会出现虚线?如何解决?求教!
js/bootstrap.js之前 引入Ext库没?
json没问题
<script type="text/javascript" src="js/bootstrap.js"></script>
这句话引入了
<html>
<head>
<base href="http://localhost:8080/kuaidianHoutai_0002/">
<script type="text/javascript" src="ext-all.js"></script>
<title>My JSP '01.jsp' starting page</title>
</head>
<body>
</body>
</html>
<link rel="stylesheet" type="text/css" href="css/ext-all.css">
<link rel="stylesheet" type="text/css" href="css/example.css" />
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/ext-all.js"></script>
<script type="text/javascript" src="js/ext-all-debug.js"></script>
<script type="text/javascript" src="js/ext-lang-zh_CN.js"></script>
这是完整的类库
<html>
<head>
<base href="http://localhost:8080/kuaidianHoutai_0002/">
<title>My JSP '01.jsp' starting page</title>
</head>
<body>
</body>
</html>
这个东西
response.write ""
response.end'==========结束输出
%>
html代码