当输入法切换成中文输入法时,会有compositionstart和compositionend事件发生
var flag = true;//判断中文输入状态下是否输入完成
$(".input-line input").on("compositionstart",function(){
//开始输入中文
flag = false;
console.log("start");
})
$(".input-line input").on("compositionend",function(e){
//结束输入中文
flag = true;
console.log("end");
})
$("input").bind("input propertychange", function(){
console.log("test");
});
最后
以上就是强健手链最近收集整理的关于jQuery input监听数据输入触发事件(文本框内容改变即时触发事件)的全部内容,更多相关jQuery内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复