EXT表单
ETX系列:
EXT基礎(chǔ)
EXT表單
EXT表格
EXT事件
EXT窗口
EXT按鈕事件
純表單
<html>
<head><title>演示</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" media="all" href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script><script src="extjs/build/locale/ext-lang-zh_CN.js"></script><script type="text/javascript">
Ext.onReady(function(){var form1 = new Ext.form.FormPanel({title:'綜合查詢',applyTo:'search_form',frame:false,items: [{}]});});</script>
</head></head>
<body>
<div id="hello"></div>
<div id='search_form'></div>
</body>
</html>
注意:frame:false,和frame:true的差異
?
基本表單
<html>
<head><title>演示</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" media="all" href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script><script src="extjs/build/locale/ext-lang-zh_CN.js"></script><script type="text/javascript">
Ext.onReady(function(){var form1 = new Ext.form.FormPanel({title:'綜合查詢',applyTo:'search_form',frame:true,items: [{xtype: 'textfield',fieldLabel: '名稱',name: 'title'},{xtype: 'textfield',fieldLabel: '內(nèi)容',name: 'director'}],buttons:[{text:'開始查詢',handler:function(){doSearch();}}]});var doSearch=function()
{
Ext.Msg.alert('提示','操作已經(jīng)成功');
}});</script>
</head></head>
<body>
<div id="hello"></div>
<div id='search_form'></div>
</body>
</html>
?
?
表單跳轉(zhuǎn):
var doSearch=function() { //Ext.Msg.alert('提示','操作已經(jīng)成功'); location.href ='d.php'; }
?
表單元素設(shè)置ID以及獲取
設(shè)置id
items: [{ xtype: 'textfield', fieldLabel: '名稱', name: 'title', id:'tt' },
獲取id:
Ext.Msg.alert('提示','操作已經(jīng)成功'+Ext.getDom("title").id);
完整代碼
<html>
<head><title>演示</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" media="all" href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script><script src="extjs/build/locale/ext-lang-zh_CN.js"></script><script type="text/javascript">
Ext.onReady(function(){var form1 = new Ext.form.FormPanel({title:'綜合查詢',applyTo:'search_form',frame:true,items: [{xtype: 'textfield',fieldLabel: '名稱',name: 'title',id:'tt'},{xtype: 'textfield',fieldLabel: '內(nèi)容',name: 'director'}],buttons:[{text:'開始查詢',handler:function(){doSearch();}}]});var doSearch=function()
{
Ext.Msg.alert('提示','操作已經(jīng)成功'+Ext.getDom("title").id);
}});</script>
</head></head>
<body>
<div id="hello"></div>
<div id='search_form'></div>
</body>
</html>
如果不設(shè)置id系統(tǒng)會默認給其id
注釋//?id:'tt'
比較就明白了
?
獲取文本框內(nèi)容
Ext.Msg.alert('提示','操作已經(jīng)成功'+Ext.getDom("title").value);
或者
Ext.get('title').getValue()
?
聲明示定義文本框以及獲取值
<html>
<head><title>演示</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" media="all" href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script><script src="extjs/build/locale/ext-lang-zh_CN.js"></script><script type="text/javascript">
Ext.onReady(function(){var txtAccount = new Ext.form.TextField({width:120,fieldLabel:'用戶名'});var form1 = new Ext.form.FormPanel({title:'綜合查詢',applyTo:'search_form',frame:true,items: [{xtype: 'textfield',fieldLabel: '名稱',name: 'title'},{columnWidth:.5,layout: 'form',items: [txtAccount]},{xtype: 'textfield',fieldLabel: '內(nèi)容',name: 'director'}],buttons:[{text:'開始查詢',handler:function(){doSearch();}}]});var doSearch=function()
{
//Ext.Msg.alert('提示','操作已經(jīng)成功'+Ext.getDom("title").id);
Ext.Msg.alert('提示','操作已經(jīng)成功'+txtAccount.getValue());
}});</script>
</head></head>
<body>
<div id="hello"></div>
<div id='search_form'></div>
</body>
</html>
?
定義單選框以及獲取選中
<html>
<head><title>演示</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" media="all" href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script><script src="extjs/build/locale/ext-lang-zh_CN.js"></script><script type="text/javascript">
Ext.onReady(function(){var txtAccount = new Ext.form.TextField({width:120,fieldLabel:'用戶名'});var checkFlag = new Ext.form.Checkbox({boxLabel:'是',fieldLabel:'是否選擇',value:1});var form1 = new Ext.form.FormPanel({title:'綜合查詢',applyTo:'search_form',frame:true,items: [{xtype: 'textfield',fieldLabel: '名稱',name: 'title'},{columnWidth:.5,layout: 'form',items: [txtAccount]},{columnWidth:.5,layout: 'form',items: [checkFlag]},{xtype: 'textfield',fieldLabel: '內(nèi)容',name: 'director'}],buttons:[{text:'開始查詢',handler:function(){doSearch();}}]});var doSearch=function()
{
//Ext.Msg.alert('提示','操作已經(jīng)成功'+Ext.getDom("title").id);
//Ext.Msg.alert('提示','操作已經(jīng)成功'+txtAccount.getValue());
var rejectFlag =0;
if(checkFlag.checked==true)
{
rejectFlag=1;
}
Ext.Msg.alert('提示','操作已經(jīng)成功'+rejectFlag);
}});</script>
</head></head>
<body>
<div id="hello"></div>
<div id='search_form'></div>
</body>
</html>
?
下拉框綁定以及獲取選中值
?
<html>
<head><title>演示</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" media="all" href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script><script src="extjs/build/locale/ext-lang-zh_CN.js"></script><script type="text/javascript">
Ext.onReady(function(){var txtAccount = new Ext.form.TextField({width:120,fieldLabel:'用戶名'});var checkFlag = new Ext.form.Checkbox({boxLabel:'是',fieldLabel:'是否選擇',value:1});var DeptDs = new Ext.data.Store({proxy: new Ext.data.HttpProxy({method:'post',url: 'd.php',params:{test:'load'}}), autoLoad:true,reader:new Ext.data.JsonReader({root : 'data',id:'dddd',totalProperty : 'totalCount'}, [{name : 'value'},{name : 'text'}])});var comboDepts = new Ext.form.ComboBox({store:DeptDs,valueField :"value",displayField: "text",id:'value',mode: 'local',allowBlank:true,emptyText:'選擇省份.....',width:220,fieldLabel: '省份',blankText:'選擇省份',editable: true,anyMatch:true,tabIndex:4,triggerAction: 'all'});var form1 = new Ext.form.FormPanel({title:'綜合查詢',applyTo:'search_form',frame:true,items: [{xtype: 'textfield',fieldLabel: '名稱',name: 'title'},{columnWidth:.5,layout: 'form',items: [txtAccount]},{columnWidth:.5,layout: 'form',items: [checkFlag]},{columnWidth:.5,layout: 'form',items: [comboDepts]},{xtype: 'textfield',fieldLabel: '內(nèi)容',name: 'director'}],buttons:[{text:'開始查詢',handler:function(){doSearch();}}]});var doSearch=function()
{
//Ext.Msg.alert('提示','操作已經(jīng)成功'+Ext.getDom("title").id);
//
//Ext.Msg.alert('提示','操作已經(jīng)成功'+txtAccount.getValue());//Ext.Msg.alert('提示','操作已經(jīng)成功'+Ext.get('title').getValue());
Ext.Msg.alert('提示','操作已經(jīng)成功'+comboDepts.getValue());}});</script>
</head></head>
<body>
<div id="hello"></div>
<div id='search_form'></div>
</body>
</html>
d.php返回的數(shù)據(jù)
{"success":true,"data":[
{"value":"010","text":"北京"},
{"value":"021","text":"上海"}
]}
?
ajax提交表單數(shù)據(jù)
?
<html>
<head><title>演示</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" media="all" href="extjs/resources/css/ext-all.css" />
<script type="text/javascript" src="extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script><script src="extjs/build/locale/ext-lang-zh_CN.js"></script><script type="text/javascript">Ext.onReady(function(){Ext.QuickTips.init();Ext.form.Field.prototype.msgTarget = 'side';var simple = new Ext.FormPanel({labelWidth: 75,baseCls: 'x-plain',defaults: {width: 150},defaultType: 'textfield',items: [{fieldLabel: '帳戶',name: 'name',allowBlank:false,blankText:'帳戶不能為空'},{inputType:'password',fieldLabel: '密碼',name: 'pwd',allowBlank:false,blankText:'密碼不能為空'}],buttons: [{text: '登錄系統(tǒng)',type: 'submit',handler:function(){if(simple.form.isValid()){//ExtJs Ajax表單提交simple.form.doAction('submit',{url:'d1.php',method:'post',params:'',success:function(result,request){//alert(action.result.msg);Ext.Msg.alert('操作成功',request.result.data);//json是什么這里就是什么},failure:function(){Ext.Msg.alert('警告', '未知的失敗原因!');}});}}}]});win = new Ext.Window({id:'win',title:'用戶登陸',layout:'fit',width:300,height:150,plain:true,bodyStyle:'padding:5px;',maximizable:false,closeAction:'close',closable:false,collapsible:true,plain: true,buttonAlign:'center',items:simple});win.show();});
</script>
</head></head>
<body>
<div id="hello"></div></body>
</html>
驗證的d.php頁面
<?php
$arr = array(
'success' => 'true',
'data' => '1001111111111111111111111'
);
$json_string = json_encode($arr);
echo $json_string;
?>
?
說明:
必須返回json的格式切要有success,類似這樣的:
("{success:true,info:'1001111111111111111111111!'}");
=========================================
//ExtJs 表單提交??form.getForm().submit({??
??? success:function(){??
??? },??
??? failure:function(){??
??? }??
});??
//ExtJs Ajax表單提交??
form.form.doAction('submit', {??????
??? url : 'user.do?method=login',????????
??? method : 'post',??????
??? // 如果有表單以外的其它參數(shù),可以加在這里。我這里暫時為空,也可以將下面這句省略??????????
??? params : '',???????
??? // 第一個參數(shù)是傳入該表單,第二個是Ext.form.Action對象用來取得服務器端傳過來的json數(shù)據(jù)??????????
??? success : function(form, action) {???????
??????? Ext.Msg.alert('操作', action.result.data);?? //result為json對象???????
??????? this.disabled = false;????????
??? },??????????
??? failure : function(form, action) {???????
??????? Ext.Msg.alert('警告', '用戶名或密碼錯誤!');??????????
??????? // 登錄失敗,將提交按鈕重新設(shè)為可操作??????????
??????? this.disabled = false;????????
??? }??????????
});??????????
?
?
//ExtJs Ajax普通提交??
Ext.Ajax.request({???????????????
???? url: 'login.do',??? //請求地址???????
???? //提交參數(shù)組??????????
???? params: {??????????
???????? form.getForm().getValues()?? //取出表單所有值??????
???? },??????????
???? //成功時回調(diào)??????????
???? success: function(response, options) {??????????
??????? //獲取響應的json字符串??????????
?????? var responseArray = Ext.util.JSON.decode(response.responseText);???????????????????????????????????????????????????????
??????? if(responseArray.success==true){??????????
??????????? Ext.Msg.alert('恭喜','您已成功登錄!');??????????????
??????? } else{??????????
??????????? Ext.Msg.alert('失敗','登錄失敗,請重新登錄');??????????????
??????? }??????????
??? }??????????
});?????
?
//老grid??
var myData = ${jobs}; //二維數(shù)組??
var store = new Ext.data.ArrayStore({??
??? fields: [??
?????? {name: 'group'},??
?????? {name: 'name'},??
?????? {name: 'description'},??
?????? {name: 'jobClass'},??
?????? {name: 'namegroup'}??
??? ]??
});??
store.loadData(myData);??
var grid = new Ext.grid.GridPanel({??
??? title:"<fmt:message key='title.listAllJobs'/>",??
??? store: store,??
??? width:all_width,??
??? autoHeight : true,??
??? autoExpandColumn : 'namegroup',???
??? viewConfig : {??
?????? forceFit : true???
??? },??
??? stripeRows: true,??
??? columns: [??
??????? {header: "<fmt:message key='label.job.group'/>", width: 140, sortable: true, dataIndex: 'group'},??
??????? {header: "<fmt:message key='label.job.name'/>", width: 140, sortable: true, dataIndex: 'name'},??
??????? {header: "<fmt:message key='label.job.description'/>", width: 180, sortable: true, dataIndex: 'description'},??
??????? {header: "<fmt:message key='label.job.jobClass'/>", width: 200, sortable: true, dataIndex: 'jobClass'},??
??????? {id : 'namegroup',header: "<fmt:message key='label.global.actions'/>", dataIndex: 'namegroup', renderer: change}??
??? ],??
??? bbar: new Ext.PagingToolbar({ afterPageText: '/ {0}',beforePageText: '頁',firstText: '第一頁'?
??????? ,prevText: '前一頁',nextText: '后一頁',lastText: '最后一頁',refreshText: '刷新',store: store??
??????? , pageSize: 20,displayInfo: true, displayMsg: '顯示 {0} - {1} 條記錄,共 {2} 條', emptyMsg: "沒有數(shù)據(jù)"})??
});??
?
//如果store設(shè)置了url屬性,可重新指定url的參數(shù):??
store.load({params:{a:1, b:2}});??
?
//如果store的內(nèi)容只是普通的數(shù)組:??
store.loadData([...]);??
?
//如果store沒有單獨的變量定義,可以用??
comboBox.initialConfig.store??
//或??
Ext.getCmp('comboId').initialConfig.store??
???????????????????
//窗口??
var win;??
?
win = new Ext.Window({//添加/修改菜單彈出窗口??
??? id:'winId',??
??? title:'',??
??? width: '',??
??? height:'',??
??? layout: 'fit',??
??? modal:true,??
??? closeAction:'hide',??
??? buttonAlign:'center',??
??? resizable:false,??
??? items: [grid],??
??? listeners:{??
??????? 'hide':function(){}??
??? }??????????
});???
Ext.getCmp('winId').show();??
?
listeners:{??
??? render:function(){},??
??? click:function(a,e){}??
}??
?
//按鈕??
var button = new Ext.Button({??
??? text:'查詢',??
??? listeners:{click:function(a,e){??
??? }}??
})????
?
//表單??
var form = new Ext.FormPanel({??
??? id:'form',??
??? width: '',??
??? height:42,??
??? labelWidth: '',???????????? //標簽寬度??
??? layout:'column',??????????? //分列??
??? style:'padding:4 4 2 4',??
??? defaults:{layout:'form'},?? //子項默認使用form樣式??
??? colspan:2,??
??? frame:true,??
??? submit: function(){??
?????? this.getEl().dom.action = '${pageContext.request.contextPath}/layout.table?method=addData'; //連接到服務器的url地址??
?????? this.getEl().dom.method = 'post';??
?????? this.getEl().dom.submit();??
??? },??
??? items:[??
??? {?????
??????? columnWidth:.17,??
??????? items: [{??
??????????? xtype:'label',??
??????????? text:'',??
??????????? emptyText:'',??
??????????? allowBlank:false,??
??????????? blankText:'',??
??????????? regex:/^[A-Za-z0-9]+$/,??
??????????? regexText:'',??
??????????? maxLength:20,???
??????????? maxLengthText:''?
??????? }]??
??? },{??
??????? columnWidth:.04,??
??????? items: [button]??
??? }]??
});???
//form.getForm().isValid()??
?
//表格??
var table = new Ext.Panel({??
??? renderTo:'content',??
??? layout:'table',??
??? width:'',??
??? border:false,??
??? layoutConfig: {columns:2},????? //劃分兩列??
??? bodyStyle:'background:#dfe8f6;border: 1px solid #dfe8f6',??
??? defaults: {frame:true},???????? //填充文本背景顏色??
??? items:[form,chart,grid]??
})??
?
//標簽頁??
var tabs = new Ext.TabPanel({??
??? resizeTabs:true, // tab寬度自動調(diào)整??
??? minTabWidth: 115,?? //tab最小寬度值??
??? tabWidth:135,?????? //tab初始寬度??
??? enableTabScroll:true,//tab超出范圍出現(xiàn)橫向滾動條??
??? frame:true,??
??? activeTab:0,??
??? defaults: {bodyStyle:'background:#dfe8f6;border: 1px solid #dfe8f6'},???
??? items:[{??
??????? id:'tab1_1',??
??????? title:'',??
??????? items:[chart1]? //添加table??
??? },{??
??????? id:'tab1_2',??
??????? title:'',??
??????? items:[chart1]??
??? }]??
});??
?
var tools = [{??
??? id:'gear',??
??? qtip :'為表單分配權(quán)限',??
??? handler: function(e, target, panel){??
??????? //獲得grid中所選的表單編號(即id值)??
??????? sRows = grid.getSelections('id_');??
??????? if(sRows==null)???
??????? {??
??????????? Ext.Msg.show({??
??????????????????????? title:'提示',??
??????????????????????? msg: '<b>請選擇表單后再分配權(quán)限!</b>',??
??????????????????????? buttons: {ok:'確定'},??
??????????????????????? icon: Ext.MessageBox.INFO,??
??????????????????????? maxWidth :300,??
??????????????????????? minWidth :300,??
??????????????????????? closable:false,??
??????????????????????? defaultTextHeight :100??
??????????????????????? });??
??????????? return;??
??????? }??
??? }??
}]??
?
//框架面板??
var border = new Ext.Panel({??
??? layout:'border',??
??? renderTo:'content',??
??? width:'',??
??? height:'',??
??? items:[{??
??????? region:'north',??
??????? xtype:'panel',??
??????? margins: '4 4 2 4',??
??????? height:42,??
??????? bodyStyle:'background:#dfe8f6;border: 1px solid #dfe8f6',??
??????? items:[form]??
??? },{??
??????? region:'west',??
??????? id:'west-panel',??
??????? width: '',??
??????? style:'padding:2 2 4 4',??
??????? collapsible: true,??
??????? defaults:{border:false},??
??????? layoutConfig:{??
??????????? animate:true?
??????? },??
??????? items: [tree]??
??? },{??
??????? region:'center',??
??????? style:'padding:2 4 4 2',??
??????? border:false,??
??????? items:[tabs]??
??? }]??
});??
?
//日期控件??
var dateSign_start = new Ext.form.DateField({??
??? value:startTime,??
??? format:"Y-m",??
??? fieldLabel:'開始時間',??
??? listeners:{??
??????? change:function(){??
??????? }??
??? }???
});??
?
//下拉列表??
//靜態(tài)??
var fields=["name","valtext"];??
var data_branchCompany=[['01','1月'],['02','2月']];??
var store_branchCompany = new Ext.data.SimpleStore({???
??? fields:fields,??
??? data:data_month??
});??
//動態(tài)??
var dsUrl_branchCompany ="${pageContext.request.contextPath}/adapter2Table.table?key=branchCompany&dropdownlist=true";???
var store_branchCompany = new Ext.data.Store({???
??? url:dsUrl_branchCompany,??
??? autoLoad: true,??
??? reader: new Ext.data.JsonReader({},[??
???? //設(shè)置如何解析??
??? {name:'name'},??
??? {name:'valtext'}??
??? ])??
??? ,listeners:{??
??????? "load":function()??
??????? {??
??????? }??
??? }??
});??
var comboBox_branchCompany = new Ext.form.ComboBox({??
??? id:'comboBox_branchCompanyId',??
??? width: 75,???
??? selectOnFocus : true,??????
??? allowBlank:false,??
??? readOnly:true,??
??? emptyText: '',???
??? fieldLabel:'',????
??? store:store_branchCompany,??
??? triggerAction: "all",? //不加該語句選中某項后??
??? mode: "local",?? //動態(tài)需要???
??? displayField: "name",??
??? valueField: "valtext",??
??? listeners: {??
??????? "select": function (combo,record,index){???
??????????? //record.get("name");??
???????? }??
??? }?????????????
});???
?
//隱藏div??
type.on("select",function(combo,record,index){??
??? if(record.get('valtext') == 0){??
??? }??
});??
?
?
//樹??
var tree = new Ext.tree.TreePanel({??
??? id:'tree',??
??? border: false,??
??? containerScroll: true,??
??? enableDD:false,//設(shè)置是否允許拖拽??
??? useArrows: false,//是否使用箭頭記號,默認為false??
??? rootVisible :true,//設(shè)置是否顯示根節(jié)點??
??? autoScroll:true,??
??? loader: new Ext.tree.TreeLoader({???
??????? dataUrl: '${pageContext.request.contextPath}/treeQuery.tree?method=queryNode&key=product_order',??
??????? listeners:{beforeload:function(treeLoader, node) {??
??????????????????? this.baseParams.id = node.id;??
??????? }}??
??? }),??
??? root: {??
??????? nodeType: 'async',??
??????? text: '付費節(jié)目',??
??????? draggable: false,??
??????? id: '1'?
??? },??
??? listeners:{??
??????? click:function(node,ev){??
??????????? id=node.id;??
??????? }??
??? }??
});??
tree.getRootNode().expand();??????
?
tree_org.on("append",function(tree,parentNode,node,index)??
{??
??? for(var i=0,len=roles.length;i<len;i++)??
??? {??
??????? if(roles[i].編號 == node.id)??
??????? {??
??????????? node.attributes.checked=true;??
??????????? break;??
??????? }??
??? }??
});??
?
//滑動菜單??
{??
??? region:'west',??
??? id:'west-panel',??
??? title:'West',??
??? width: 200,??
??? style:'padding:4 2 4 4',??
??? collapsible: true,??
??? layout:'accordion',??
??? defaults:{border:false},??
??? layoutConfig:{??
??????? animate:true?
??? },??
??? items: [{??
??????? title:'菜單1',??
??????? items:[tree]??
??? },{??
??????? title:'菜單2',??
??????? contentEl:'hw'?
??? }]??
}??
?
//表單中控件??
{??
??? fieldLabel: '性別',??
??? xtype:'radiogroup',??
??? items:[{??
??????????? boxLabel:'男',??
??????????? name: 'SEX_',??
??????????? value:"${SEX_}",??
??????????? checked:true,??
??????????? inputValue: 1??
??????? },{??
??????????? boxLabel:'女',??
??????????? name: 'SEX_',??
??????????? inputValue: 2??
??????? }]??
},{??
??? fieldLabel: 'SHOURU',??
??? xtype:'checkboxgroup',??
??? items:[{??
??????????? boxLabel:'SHOURU1',??
??????????? name: 'SHOURU',??
??????????? checked:true,??
??????????? inputValue: 1??
??????? },{??
??????????? boxLabel:'SHOURU2',??
??????????? name: 'SHOURU',??
??????????? inputValue: 2??
??????? },{??
??????????? boxLabel:'SHOURU3',??
??????????? name: 'SHOURU',??
??????????? inputValue: 3??
??????? }]??
},{??
??? xtype:'field',??
??? inputType:'file',??
??? name:'SHUISHOU',??
??? fieldLabel:'上傳'?
},{??
??? xtype:'textfield',??
??? name:"",??
??? hidden:true,??
??? hideMode:"display",??
??? hideLabel:true,??
??? value:""?
},{??
??? frame:false,border:false,baseCls:'x-plain',items:[{??
??? xtype:'htmleditor',??
??? id:'id_htmleditor',??
??? width:500,??
??? height:350,??
??? name:'rulecontent_',??
??? fieldLabel:'規(guī)則信息'?
}]}??
?
//Ext dom操作??
Ext.getDom('')//返回Js對象??
Ext.getCmp('').getValue();??
Ext.getCmp("org-tree-panel").getChecked("id");//獲得樹節(jié)點??
Ext.getCmp('form').form.findField("name").setValue('1',true);??
Ext.getCmp('form').form.findField('name').getValue().inputValue;//radio選中值??
grid.getSelections('列名');//獲得選中??
//checkbox選中值??
var checkbox = Ext.getCmp('form').form.findField('name');??
if(checkbox.items.get(i).checked){??
??? checkbox.items.get(i).inputValue;??
}?
?
?
總結(jié)
- 上一篇: EXT窗口
- 下一篇: 生日当天肯德基全家桶真的半价吗?