欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

ExtJS筆記----FormPanel的使用

系統 1647 0
一、效果圖
    先用美圖勾引那些駐足觀望之人:
ExtJS筆記----FormPanel的使用
二、代碼講解
注意代碼中的EXT js引入路徑, 需要根據你的實際情況進行引入,否者可能出現錯誤
    <html>
	<head>
		<title>系統登錄</title>
		<meta charset="UTF-8" />
		<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" />
		<style>
		</style>
		<script type="text/javascript" src="extjs/ext-base.js"></script>
		<script type="text/javascript" src="extjs/ext-all.js"></script>
		<script type="text/javascript" src="extjs/ext-lang-zh_CN.js"></script>
	</head>
	<body>
		<form id="form1" runat="server">
			<script type="text/javascript">
				Ext.onReady(function() {

					Ext.QuickTips.init();
					Ext.form.Field.prototype.msgTarget = 'side';

					var form1 = new Ext.FormPanel({
						layout : 'form',
						collapsible : true,
						autoHeight : true,
						frame : true,
						renderTo : Ext.getBody(),
						title : '<center style="curor:hand" onclick="window.location.reload();">表單控件</center>',
						style : 'margin-left:auto;margin-right:auto;width:500px;margin-top:8px;',
						//設置標簽對齊方式
						labelAlign : 'right',
						//設置標簽寬
						labelWidth : 170,
						//設置按鈕的對齊方式
						buttonAlign : 'center',
						//默認元素屬性設置
						defaults : {
							width : 180
						},
						items : [{
							fieldLabel : '文本框控件',
							name : 'TextBox',
							xtype : 'textfield'
							//,readOnly : true            //只讀
							//,emptyText    :'請輸入數據'    //為空時顯示的文本,注意不是value
						}, {
							fieldLabel : '只允許輸入數字',
							name : 'TextBoxNumber',
							xtype : 'numberfield'
							//,allowDecimals: false     // 允許小數點
							//,allowNegative: false,     // 允許負數
							//,maxValue:1000      //最大值
							//,minValue:0            //最小值
						}, {
							fieldLabel : '下拉框控件',
							name : 'DropDownList',
							xtype : 'combo',
							//mode : 'local',
							displayField : "Name",
							//設置為選項的value的字段
							valueField : "Id",
							//是否可以輸入,還是只能選擇下拉框中的選項
							editable : false,
							typeAhead : true,
							//必須選擇一項
							//forceSelection: true,
							//輸入部分選項內容匹配的時候顯示所有的選項
							triggerAction : 'all',
							//selectOnFocus:true,
							//數據
							store : new Ext.data.SimpleStore({
								fields : ['Id', 'Name'],
								data : [[1, '男'], [0, '女']]
							})
						}, {
							fieldLabel : '日歷控件',
							xtype : 'datefield',
							name : 'DateControl',
							format : "Y-m-d",
							editable : false
							//, 默認當前日期
							//value:new Date().dateFormat('Y-m-d')
						}, {
							fieldLabel : '單選控件',
							xtype : 'radiogroup',
							name : 'Radios',
							items : [{
								name : 'RadioItems',
								boxLabel : '選我',
								inputValue : '1',
								checked : true
							}, {
								name : 'RadioItems',
								boxLabel : '選我吧',
								inputValue : '0'
							}]
						}, {
							fieldLabel : '復選控件',
							xtype : 'checkboxgroup',
							name : 'Checkboxs'
							//columns屬性表示用2行來顯示數據
							,
							columns : 2,
							items : [{
								name : 'CheckboxItems',
								boxLabel : '香蕉',
								inputValue : 'A'
							}, {
								name : 'CheckboxItems',
								boxLabel : '蘋果',
								inputValue : 'B'
							}, {
								name : 'CheckboxItems',
								boxLabel : '橘子',
								inputValue : 'C'
							}, {
								name : 'CheckboxItems',
								boxLabel : '桃子',
								inputValue : 'D'
							}]
						}, {
							fieldLabel : '文本域控件',
							xtype : 'textarea',
							value : '可以輸好多字!',
							height : 50
						}, {
							fieldLabel : '時間控件',
							xtype : 'timefield'
							//格式化輸出 默認為 "g:i A"
							//"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H"
							,
							format : 'H:i'
							//時間間隔(分鐘)
							,
							increment : 60
						}, {
							fieldLabel : '標簽頁',
							xtype : 'fieldset',
							title : '標簽頁',
							autoHeight : true,
							items : [{
								xtype : 'panel',
								title : '標簽頁中的面板',
								frame : true,
								height : 50
							}]
						}, {
							fieldLabel : '在線編輯器',
							xtype : 'htmleditor',
							width : 260,
							height : 100
							//以下為默認選項,其他請參照源代碼
							//,enableColors: false
							//,enableFormat : true
							//,enableFontSize : true
							//,enableAlignments : true
							//,enableLists : true
							//,enableSourceEdit : true
							//,enableLinks : true
							//,enableFont : true
						}],
						buttons : [{
							text : "保 存",
							handler : function() {
								MsgInfo('保存');
							}
						}, {
							text : "取 消",
							handler : function() {
								form1.form.reset();
							}
						}]
					});

					function MsgInfo(str_msg) {
						Ext.MessageBox.show({
							title : '提示',
							msg : str_msg,
							width : 400,
							icon : Ext.MessageBox.INFO,
							buttons : Ext.MessageBox.OK
						});
					}

				});

			</script>
		</form>
	</body>
</html>
  


本文參考:http://www.cnblogs.com/over140/archive/2009/09/06/1561257.html

ExtJS筆記----FormPanel的使用


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 二性视频 | 天天在线欧美精品免费看 | 欧美精品网| 国产精品成人一区二区三区 | 亚洲成人免费 | 超碰97在线免费 | 波多野结衣VR全景3D | 日韩中文字幕不卡 | 久久免费视频一区二区三区 | 欧美日韩国产在线人成dvd | 久久亚洲在线 | 日本欧美中文字幕 | 久久狠狠 | 欧美a级毛毛片免费视频试播 | 国产成人一区二区 | a级毛片在线免费观看 | 国产精品久久久久久久一区探花 | 青青草在线视频免费观看 | www操com| 欧美午夜精品久久久久免费视 | 黄视频网址 | 色爱av | 比比资源先锋影音网 | 国内精品一区二区在线观看 | 国产精品欧美精品 | 国产亚洲福利精品一区 | 中文字幕av一区二区 | 狠狠色噜噜狠狠狠狠米奇777 | 国产精品久久久久久久久久久久 | 成人国产一区二区三区 | 婷婷色在线观看 | 欧美一区二区三区视频 | 一本大道香蕉中文日本不卡高清二区 | 男女网 | 国产精品天天天天影视 | 色婷婷影院 | 久久99国产伦子精品免费 | 亚洲视频在线观看一区 | 久久久久久久国产精品影院 | 国产高清精品在线 | 夜夜视频 |