1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
<!
DOCTYPE
html>
<
html
>
<
head
>
<
title
>ExtJs</
title
>
<
meta
http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<
link
rel="stylesheet" type="text/css" href="ExtJs/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css">
<
script
type="text/javascript" src="ExtJs/ext-all.js"></
script
>
<
script
type="text/javascript" src="ExtJs/bootstrap.js"></
script
>
<
script
type="text/javascript" src="ExtJs/packages/ext-theme-crisp/build/ext-theme-crisp.js"></
script
>
</
head
>
<
body
>
<
script
type="text/javascript">
Ext.onReady(function(){
var tpl = new Ext.Template(
'<
table
border=1 cellpadding=2 cellspacing=2>',
'<
tr
><
td
width=90>姓名</
td
><
td
width=90>{0}</
td
></
tr
>',
'<
tr
><
td
>年纪</
td
><
td
>{1}</
td
></
tr
>',
'<
tr
><
td
>性别</
td
><
td
>{2}</
td
></
tr
>',
'</
table
>'
);
tpl.append('tpl-table', ['小王',25,'男']);
});
</
script
>
<
body
>
<
div
id="tpl-table">
<
div
>员工信息</
div
>
</
div
>
</
body
>
</
html
>
|