搭建EXTJS和STRUTS2框架(ext和struts2简单实例)(2)

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>index</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link type="text/css" href="https://www.jb51.net/ext2/resources/css/ext-all.css" />
<script type="text/javascript" src="https://www.jb51.net/ext2/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="https://www.jb51.net/ext2/ext-all.js"></script>
</head>
<body>
<script type="text/javascript">
Ext.onReady(function(){
var store=new Ext.data.JsonStore({
url:"test!select.ph",
totalProperty: "results",
root: "list",
fields:[{name:'id',mapping:'id'}, {name:'name',mapping:'name'},{name:'password',mapping:'password'}]
});
store.load();
var gird=new Ext.grid.GridPanel({
renderTo:"hello",
title:"欢迎登录",
height:150,
width:300,
columns:[
{header:"编号",dateindex:"id"},
{header:"账号",dateindex:"name"},
{header:"密码",dateindex:"password"}
],
store:store,
autoExpandColumn:2
})
})
</script>
<div> </div>
</body>
</html>

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wzfsyy.html