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

js回车
$('#dataInput').bind('keypress', function (event) {
if (event.keyCode == "13") {
window.location.href = "search.html?search=" + $('#dataInput').val();
}
});

posted @ 2018-01-23 14:38  沙滩多啦图  阅读(479)  评论(0)    收藏  举报