kongrui123as
kongrui123as
2012-06-27 10:50

为什么在页面上不显示grid表格

  • javascript

<!DOCTYPE html>


test_1.html
<link rel="stylesheet" type="text/css" href="./extjs4/resources/css/ext-all.css">
<script type="text/javascript" src="./extjs4/bootstrap.js"></script>
<script type="text/javascript" src="./extjs4/ext-all.js"></script>

<script>

  Ext.onReady(function(){

// alert("hello world");
// Ext.MessageBox.alert("hello","hello world");
var data=[ [1, 'EasyJWeb', 'EasyJF','www.easyjf.com'],
[2, 'jfox', 'huihoo','www.huihoo.org'],
[3, 'jdon', 'jdon','www.jdon.com'],
[4, 'springside', 'springside','www.springside.org.cn'] ];

   var store=new Ext.data.SimpleStore({data:data,fields:["id","name","organization","homepage"]});

   var grid = new Ext.grid.GridPanel({
       renderTo:"hello",
       title:"中国Java开源产品及团队",
       height:150,
       width:600, 
       columns:[{header:"项目名称",dataIndex:"name"},
                {header:"开发团队",dataIndex:"organization"},
                {header:"网址",dataIndex:"homepage"}],
       store:store,
       autoExpandColumn:2
 }); 

});

</script>


This is my HTML page.


  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

4条回答

为你推荐

换一换