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>
  • 相关阅读:
    2020.05.27
    static{}静态代码块与{}普通代码块之间的区别
    Spring 注解@Autowired注解
    java:List的深拷贝
    IDEA中MAVEN无法自动加载的问题
    java Comparator接口
    JAVA ArrayList<E>
    JAVA BigInteger
    JAVA输入输出
    JAVA String,StringBuilder的一些API
  • 原文地址:https://www.cnblogs.com/james-roger/p/9160585.html
Copyright © 2011-2022 走看看