extJs中的画表格和换皮肤
一、画表格
Ext.onReady(function()
{
var table = new Ext.Panel({
title: 'Table Layout',
layout:'table',
renderTo:"ceshi1",
defaults: {
// applied to each contained panel
bodyStyle:'padding:20px'
},
layoutConfig: {
// The total column count must be specified here
columns: 3
},
items: [{
html: '<p>Cell A content</p>',
rowspan: 2
},{
html: '<p>Cell B content</p>',
colspan: 2
},{
html: '<p>Cell C content</p>',
cellCls: 'highlight'
},{
html: '<p>Cell D content</p>'
}]
});
})
二、换皮肤
我们得将引入css样式表
<link rel="stylesheet" type="text/css" href="Ext/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="Ext/resources/css/xtheme-slate.css" />
<script type="text/javascript" src="Ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="Ext/ext-all.js"></script>