移动端输入框 回车键会搜索

 js回车
      $('#dataInput').bind('keypress', function (event) {
        if (event.keyCode == "13") {
            window.location.href = "search.html?search=" + $('#dataInput').val();
        }
    });
posted @ 2018-01-23 14:38  沙滩多啦图  阅读(464)  评论(0编辑  收藏  举报