中文输入法input事件

 var iscancel = false;
                $("#sysearch").on({
                    input: function (e) {
                        if (!iscancel) {
                            //do something
                        }
                    },
                    compositionstart: function () {
                        iscancel = true;
                    },
                    compositionend: function () {
                        iscancel = false;
                        $(this).trigger('input');
                    }
                })

猜你喜欢

转载自www.cnblogs.com/csyyses/p/9806185.html
今日推荐