<HTML> <HEAD> <TITLE>使用EXT输出HelloWorld</TITLE> <!-- 导入extjs配置 … ... --> <link rel="stylesheet" type="text/css" href="./../ext/resources/css/ext-all.css"/> <script type="text/javascript" src="./../ext/adapter/ext/ext-base.js"></script> <script type="text/javascript" src="./../ext/ext-all.js"></script> <style type="text/css"> .allow-float {clear:none!important;} .stop-float {clear:both!important;} .float-left {float:left;} </style> <script type="text/javascript"> Ext.onReady(function(){ Ext.BLANK_IMAGE_URL='./../ext/resources/images/default/s.gif'; Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; var form = new Ext.form.FormPanel({ title: '提示信息(qtip)', labelSeparator: ':', bodyStyle: 'padding:5 5 5 5', height: 500, width: 300, frame: true, labelWidth: 60, labelAlign: 'right', applyTo: 'form', items:[ new Ext.form.TextField({ fieldLabel: '姓名', id: 'userName', selectOnFocus: true, allowBlank: false, regex: /^([\w]+)(.[\w]+)*@([\w-]+\.){1,5}([A-Za-z]){2,4}$/, regexText: '用户名格式错误', blankText: '请填写用户名' }), new Ext.form.TextField({ fieldLabel: '密码', allowBlank: false, blankText: '请填写密码', inputType: 'password' }), new Ext.form.TextArea({ id: 'memo', width: 150, fieldLabel: '备注' }), new Ext.form.NumberField({ fieldLabel: '整数', allowDecimals: false, //不允许输入小数 nanText: '请输入有效的整数', //无效数字提示 allowNegative: false //不允许输入负数 }), new Ext.form.NumberField({ fieldLabel: '小数', decimalPrecision: 2, //精确到小数点后两位 allowDecimals: true, //允许输入小数 nanText: '请输入有效的小数', //无效数字提示 allowNegative: false //不允许输入负数 }), new Ext.form.NumberField({ fieldLabel: '数字限制', baseChars: '12345' //输入数字范围 }), new Ext.form.NumberField({ fieldLabel: '数值限制', maxValue: 100, //最大值 minValue: 50, //最小值 minText: '小了', maxText: '大了' }), new Ext.form.Radio({ name: 'sex', fieldLabel: '性别', boxLabel: '男' }), new Ext.form.Radio({ name: 'sex', fieldLabel: '性别', boxLabel: '女' }), new Ext.form.Checkbox({ name: 'swim', fieldLabel: '爱好', boxLabel: '游泳' }), new Ext.form.Checkbox({ name: 'walk', fieldLabel: '爱好', boxLabel: '散步' }), new Ext.form.Radio({ name: 'gender', itemCls: 'float-left', clearCls: 'allow-float', fieldLabel: '性别', boxLabel: '男' }), new Ext.form.Radio({ name: 'gender', clearCls: 'stop-float', hideLabel: true, boxLabel: '女' }), new Ext.form.Checkbox({ name: 'hob', itemCls: 'float-left', clearCls: 'allow-float', fieldLabel: '爱好', boxLabel: '游泳' }), new Ext.form.Checkbox({ name: 'inter', clearCls: 'stop-float', hideLabel: true, boxLabel: '散步' }), new Ext.form.TriggerField({ id: 'center', fieldLabel: '触发字段', hideTriggerClick: false, onTriggerClick : function(e){ var center = form.findById("center"); alert(center.getValue()); } }) ], buttons:[{ text: '确定', handler: showValue }] }); function showValue(){ var memo = form.findById("memo"); alert(memo.getValue()); } }); </script> </HEAD> <body id="form"> </body> </HTML>?
详细解决方案
form表单属性引见
热度:165 发布时间:2012-10-11 10:16:10.0
相关解决方案
- 求jquery.form.js+jquery.validate.min.js 用ajax提交表单的代码范例
- 关于<form action >的一个有关问题
- jquery form 有关问题
- form 表单交付 <form action="<c:url value='desktop'/>"
- ENCTYPE="multipart/form-data"文件下传有关问题
- form.getForm.submit对象不支持此属性或步骤
- jsp中<form>标记有关问题?头疼了很多天
- 关于enctype="multipart/form-data"及过滤器的怪异有关问题~
- import form.addBookForm 有晓得这个包的出处的嘛?SOS~
- Windows Form 中怎么将 treeview 的节点与页面内容关联
- Form.FormClosing事件不触发(winform)解决思路
- postbackurl 和 <form action="">中的action有什么区别解决方法
- 求问大家html submit表单后一些控件为什么在服务端request.form.allkeys里取不到呢解决方案
- asp.net 的 form post 哪里去了?解决方法
- Request.Form 的
- Form Control在IE中使用的有关问题
- form 之间传值,该如何解决
- 第 1 行: 'form' 附近有语法异常
- Request.Form[4]的疑问?解决方法
- 怎样把Html文本转换为System.Windows.Form.HtmlDocment对象解决思路
- 关于'form' 附近有语法异常(待)
- 关于Profile,Form,Cookies如何使用?多谢
- 怎么在</form>之前写javascript脚本
- 关于asp.net request.form 的有关问题
- 请教大家都是把<form runat="server">放在母板页里还是放在内容页里?那种方式好?
- form 认证 cookie 永久保留有关问题
- 有哪位高手知道Page.Request.Form.Set()的用法?
- Request.Form["DropDownList5"].ToString()这句话是什么意思
- MOSS 2007中InfoPath Form Template 不能下传
- createobject("form")创建表单怎么保存