Ext.form.field.comboBox

<html> <head>     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">     <title>Contact Form</title>

    <!-- ExtJS -->     <script type="text/javascript" src="../../locale/ext-lang-zh_CN.js"></script>     <script type="text/javascript" src="../../bootstrap.js"></script>

    <!-- Shared -->     <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />

    <!-- GC -->

    <!-- Example -->   <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:'北京',post:'100000'},

{province:'北京',post:'100000'},

{province:'北京',post:'100000'},

{province:'北京',post:'100000'},

{province:'北京',post:'100000'},

{province:'北京',post:'100000'},

{province:'北京',post:'100000'},

{province:'北京',post:'100000'},

{province:'北京',post:'100000'},

{province:'北京',post:'100000'}]

});

Ext.create('Ext.form.Panel',{

title:'Ext.form.field.comboBox本地数据显示',

renderTo:Ext.getBody(),

bodyPadding:5,

frame:true,

height:100,

width:270,

defaults:{

labelSeparator:':',

labelWidth:70,

width:180,

labelAlign:'right'

},

items:[{

xtype:'combo',

listConfig:{

emptyText:'未找到匹配值',

maxHeight:60

}, name:'post',

fieldLabel:'邮政编码',

triggerAction:'All',

store:postStore,

displayField:'province',

valueField:'post',

queryMode:'local',

forceSelection:true,

typeAhead:true,

value:'100000'

}]

});

});

</script>

    <style type="text/css">             </style> </head> <body> <div id='form'></div>    </body> </html>

转载于:https://www.cnblogs.com/ljhzq/archive/2013/05/23/3095151.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值