zoukankan      html  css  js  c++  java
  • 点击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>
    
    

  • 相关阅读:
    团队开发冲刺第二阶段_1
    团队开发冲刺第一阶段_7
    mysql 官方集群
    Tomcat提高并发
    Percona XtraDB Cluster 5.7
    Mysql常用配置及优化
    Linux 常用命令
    数据库主从复制
    Linux 环境下Web环境搭建————ActiveMQ
    Linux 下Web环境搭建————redis
  • 原文地址:https://www.cnblogs.com/meetrice/p/1788351.html
Copyright © 2011-2022 走看看