zoukankan      html  css  js  c++  java
  • jquery绑定回车事件

     //回车事件绑定
        $(".left-content").keyup(function(event){
            var theEvent = event || window.event;
            var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
            if(event.keyCode ==13){
                $(".textbox-addon").click();
            }
        });
      //回车事件绑定
        $("#search-div").bind("keydown",function(e){
            // 兼容FF和IE和Opera
            var theEvent = e || window.event;
            var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
            if (code == 13) {
                //回车执行查询
                $("#terminalList-search-btn").click();
            }
        });
    <div id="search-div">
        <input type="hidden" id="shipInfo_edit_shipId" value="${shipId}">
          <fieldset>
            <legend>${message("ov.terminalInfo.search")}</legend>
            <form id="terminalList-search-form" class="search-form">
               
                    <input type="text" class="easyui-textbox" name="terminalId" validtype="length[0,20]"/>
              
               
                    <input type="text" class="easyui-textbox" name="number" validtype="length[0,20]"/>
              
            </form>
            <div class="search-item">
                <button id="terminalList-search-btn" class="easyui-linkbutton" data-options="iconCls:'icon-search'">${message("ov.search")}</button>
            </div>
          </fieldset>
    </div>
  • 相关阅读:
    Qt实现模糊搜索
    Qt解析多级xml文件
    insert into
    Git忽略规则(.gitignore配置)不生效原因和解决
    搭建vue开发环境
    表单
    事件处理
    列表渲染
    条件渲染
    class与style绑定
  • 原文地址:https://www.cnblogs.com/james-roger/p/9160585.html
Copyright © 2011-2022 走看看