Xinu

js 回车键触发搜索
//$('input[name=keyword]')关键字对象 $('input[name=keyword]')....
扫描右侧二维码阅读全文
25
2018/08

js 回车键触发搜索

//$('input[name=keyword]')关键字对象
$('input[name=keyword]').on('keypress',function(e){
        if (13 === e.keyCode) {
            e.stopPropagation();
            //搜索业务代码
            return false;
        }
    });
Last modification:August 25th, 2018 at 12:34 pm

Leave a Comment