ExtJs之Ext.form.field.ComboBox组合框
<!DOCTYPE html>
<html>
<head>
<title>ExtJs</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="ExtJs/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css">
<script type="text/javascript" src="ExtJs/ext-all.js"></script>
<script type="text/javascript" src="ExtJs/bootstrap.js"></script>
<script type="text/javascript" src="ExtJs/packages/ext-theme-crisp/build/ext-theme-crisp.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
/*
Ext.regModel('PostInfo', {
fields: [{name: 'province'}, {name: 'post'}]
});
var postStore = Ext.create('Ext.data.Store', {
model: 'PostInfo',
data: [
{province: 'BeiJing', post: '10000'},
{province: 'TongXian', post: '10001'},
{province: 'Changping', post: '10002'},
{province: 'DangXing', post: '10003'},
{province: 'Bg', post: '10004'},
{province: 'Yangqing', post: '10500'},
{province: 'Sunyi', post: '10006'},
{province: 'HuaiRou', post: '10007'}
]
});
*/
Ext.define('PostInfo', {
extend: 'Ext.data.Model',
fields: [{name: 'province'}, {name: 'post'}]
});
var postStore = Ext.create('Ext.data.Store', {
'model': 'PostInfo',
'data': [
{province: 'BeiJing', post: '10000'},
{province: 'TongXian', post: '10001'},
{province: 'Changping', post: '10002'},
{province: 'DangXing', post: '10003'},
{province: 'Bg', post: '10004'},
{province: 'Yangqing', post: '10500'},
{province: 'Sunyi', post: '10006'},
{province: 'HuaiRou', post: '10007'}
]
});
Ext.create('Ext.form.Panel', {
title: 'Ext.form.field.ComboBox.Sample',
renderTo: Ext.getBody(),
bodyPadding: 5,
frame: true,
height: 1000,
width: 870,
defaults: {
labelSeparator: ':',
labelWidth: 170,
width: 300,
labelAlign: 'left'
},
items: [{
xtype: 'combo',
listConfig: {
emptyText: 'none match',
maxHeight: 260
},
name: 'post',
fieldLabel: 'postcode',
triggerAction: 'all',
store: postStore,
displayField: 'province',
valueField: 'post',
queryMode: 'local',
forceSelection: true,
typeAhead: true,
value: '10002'
}]
});
});
</script>
</head>
<body>
<div id='form'></div>
<div id='form1'></div>
</body>
</html>

ExtJs之Ext.form.field.ComboBox组合框的更多相关文章
- ExtJs之Ext.form.field.TimePicker DatePicker组合框
<!DOCTYPE html> <html> <head> <title>ExtJs</title> <meta http-equiv ...
- Ext.form.field.Picker (ComboBox、Date、TreePicker、colorpick.Field)竖向滚动导致布局错误
ComboBox.Date.TreePicker.colorpick.Field这些继承了Ext.form.field.Picker的控件. 在6.0.0和6.0.1中,在界面中存在竖向滚动条时,点击 ...
- 表单(上)EasyUI Form 表单、EasyUI Validatebox 验证框、EasyUI Combobox 组合框、EasyUI Combo 组合、EasyUI Combotree 组合树
EasyUI Form 表单 通过 $.fn.form.defaults 重写默认的 defaults. 表单(form)提供多种方法来执行带有表单字段的动作,比如 ajax 提交.加载.清除,等等. ...
- ExtJs Ext.form.field.TextArea+Ckeditor 扩展富文本编辑器
Ext.define("MyApp.base.BaseTextArea", { extend: "Ext.form.field.TextArea", xtype ...
- ExtJS4.2学习(17)表单基本输入控件Ext.form.Field(转)
鸣谢:http://www.shuyangyang.com.cn/jishuliangongfang/qianduanjishu/2013-12-11/189.html --------------- ...
- 重写 Ext.form.field 扩展功能
直接代码,放项目overrides文件夹中即可 //重写类 表单父类 //支持allowBlank动态绑定 Ext.define("override.form.field.Base" ...
- 47. Ext.form.Field.prototype.msgTarget
转自:https://blog.csdn.net/a1542aa/article/details/24295791 ExtJS.form中msgTarget Ext表单提示方式:msgTarget:有 ...
- combobox组合框
最近在改BUG的时候发现,combobox组合框如果选择的是Dropdown模式在初始化combobox对象时候有如下操作 1.SetDlgItemInt(IDC_WB_FONTSIZECOMBOX, ...
- 学习EXTJS6(8)基本功能-表单的基础表字段Ext.form.field.Basic
Ext.form.field.Basic是表单字段的基类. Ext.form.field.Text Ext.form.field.TextArea Ext.form.field.Number Ext. ...
随机推荐
- Nginx源码结构
上一章对Nginx的架构有了一个初步的了解.这章,为了对源码仔细的剖析,先要对Nginx的源码结构有一个了解.从宏观上把握源码模块的结构. 一.nginx源码的3个目录结构 在安装的nginx的目录下 ...
- WIFI 物理组件
物理组件参考:http://book.51cto.com/art/201404/435813.htm SDIO总线参考:此总线sd卡连接也有关系.(http://www.linuxidc.com/Li ...
- ZygoteInit 相关分析
上一篇文章我们已经分析到调用com.android.internal.os.ZygoteInit类的main函数. 今天分析一下com.android.internal.os.ZygoteInit类的 ...
- poj 1789 Truck History
题目连接 http://poj.org/problem?id=1789 Truck History Description Advanced Cargo Movement, Ltd. uses tru ...
- Amazon Kindle Device is hiring in Beijing Shanghai and Shenzhen!
This is Angela from recruitment team of Amazon Kindle Device Software & Applications, we are exp ...
- 1 通过JNI混合使用Java和C++ -----> 操作字符串
JNI(Java Native Interface)是Java语言的一部分,可以访问非Java语言编写的程序,也可以用于在C++程序中执行Java代码. 步骤: 1> 编写带有native声明 ...
- Jsp实现筛选并压缩文件批量下载
Jsp实现筛选并压缩文件批量下载 首先明确一下需求,网页端点击一下button,传递特定的参数到download.jsp网页,筛选文件,对过滤得到的文件进行压缩,然后返回前端一个压缩包下载. 以下的代 ...
- vim时,ctrl+s了一下,程序僵死了
刚刚在用vim的时候,按了ctrl+s,然后僵死了,ctrl+c.ctrl+d都没有反应. 不知怎么回事,差点就把它kill了,想探探究竟,网上查了一下,原来原来,这是个快捷键. ctrl+s 锁定屏 ...
- [磁盘管理与分区]——关于分区、磁盘分区表、MBR
磁盘连接与设备文件名的关系 1. 如下图所示:
- 如何在Report Builder中使用fnd_profile.value
在EBS的Report开发中,需要根据客户化的一个Profile来控制用户可以访问的数据,可是在开发的过程中发现一直取不到该Profile的值,后来百度才找到了原因. 解决方法: 1.添加用户参数p_ ...