[code="js"]
[size=x-large]js文件代码[/size]function a() {
var _window = new Ext.Window({
title : "窗体",
layout : "form",
width : 300,
hidden : 400,
plain : true,
closeAction : "hide",
items : [{
id : "textName",
xtype : "textfield",
fieldLabel : "姓名"
}, {
xtype : "textfield",
fieldLabel : "密码"
}],
buttons : [{
text : "确定",
handler : function() {
alert(Ext.getCmp("textName").getValue());
}
}, {
text : "取消"
}]
});
_window.show();
}
[size=x-large]页面调用代码[/size]
<!-- 引用Ext脚本样式 -->
<!-- 自定义脚本 -->
<br> Ext.onReady(a);<br>
[size=x-large]结果见附件,Ext版本Ext={version:"3.2.0"}[/size]
[/code]