点击combo激活下拉

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>04.form</title>
        <link rel="stylesheet" type="text/css" href="http://www.cnblogs.com/resources/css/ext-all.css" />
        <script type="text/javascript" src="http://www.cnblogs.com/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="http://www.cnblogs.com/ext-all.js"></script>
        <script type="text/javascript">
Ext.onReady(function(){
    Ext.QuickTips.init();

    var form = new Ext.form.FormPanel({
        labelAlign: 'right',
        labelWidth: 50,
         300,
        title: 'form',
        frame: true,
        items: [{
                    xtype:"combo",
                    fieldLabel: '选择',
                    name: 'combo',
                    store: new Ext.data.SimpleStore({
                        fields: ['value', 'text'],
                        data: [
                            ['value1', 'text1'],
                            ['value2', 'text2']
                        ]
                    }),
                    displayField: 'text',
                    valueField: 'value',
                    mode: 'local',
                    emptyText:'请选择',
					listeners:{ 
 				    focus :{fn:function(e) {
						      e.onTriggerClick();
 				    	},buffer:200} 	
				   }
                }],
        buttons: [{
            text: '保存'
        },{
            text: '读取'
        },{
            text: '取消'
        }]
    });

    form.render("form");


});
        </script>
    </head>
    <body>
        <script type="text/javascript" src="../examples.js"></script>
        <div id="form" style="margin:20px;"></div>
    </body>
</html>

原文地址:https://www.cnblogs.com/meetrice/p/1788351.html