zoukankan      html  css  js  c++  java
  • easyui-combobox绑定回车事件注意事项

    回车事件的定义的位置必须是easyui-combobox数据加载的后面,才有效果。

    HTML文件:

    <select id="aucBrandNo" class="easyui-combobox"  name="aucBrandNo" style=" 160px;"
         data-options="required:true,onHidePanel:function(){validateComboboxInputValue(this)}">
       </select>

    JS文件定义回车事件:

    //combobx数据的加载
    function
    auctionSelect(aucBrandNos,aucBrandNo) { var aucBrandNoStr = ''; $.each(aucBrandNos, function(index, temp) { aucBrandNoStr += '<option value=' + temp.key + '>' + temp.name.substring(1,4) + temp.name.substring(0,1) + '</option>'; }); $('#aucBrandNo').html(aucBrandNoStr); $('#aucBrandNo').combobox({}); $('#aucBrandNo').combobox('setValue', aucBrandNo); keyDownEventFun();//回车事件公共方法 };
    function keyDownEventFun(){
        $('#aucBrandNo').textbox('textbox').keydown(function (event) {
            if (event.keyCode == 13) {
                //TODO
            }
        });
    
    }
  • 相关阅读:
    模板
    洛谷
    Codeforces
    Codeforces
    Codeforces
    Codeforces
    洛谷
    洛谷
    洛谷
    NOIP 普及组 2016 海港
  • 原文地址:https://www.cnblogs.com/mr-wuxiansheng/p/7277144.html
Copyright © 2011-2022 走看看