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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
<code id=
"code0"
><%@ page language=
"java"
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%>
<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd"
>
<html>
<head>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>Hello Extjs4.2</title>
<link href=
"../ExtJS4.2/resources/css/ext-all-neptune.css"
rel=
"stylesheet"
>
<!-- <script src=
"../ExtJS4.2/locale/ext-lang-zh_CN.js"
></script> -->
<script src=
"../ExtJS4.2/ext-all.js"
></script>
<script type=
"text/javascript"
>
/* Start ExtJS 中自定义类 **/
//整体生命周期为:初始化、渲染、显示、隐藏
/*Ext.onReady(function(){
var box = new Ext.Panel({
el: 'test',
title:'测试标题',
floating:true,
draggable:true,
html:'测试内容',
pageX:100,
pageY:50,
width:200,
height:150
});
box.render();
});*/
Ext.onReady(
function
(){
var
box =
new
Ext.Component({
el:
'test'
,
style:
'background-color:red;position:absoulte'
,
pageX:100,
pageY:50,
width:200,
height:150
});
box.render();
});
/* END ExtJS 中自定义类 **/
</script>
</head>
<body>
<h1>我的ExtJS4.2学习之路</h1>
<hr />
作者:束洋洋
开始日期:2013-11-05 22:35:38
<h2>深入浅出Extjs之统一的组件模型</h2>
<div id=
"test"
></div>
</body>
</html> </code>
|