当前位置:网站首页>Trigger event when input is completed
Trigger event when input is completed
2022-07-23 09:06:00 【LinDaiuuj】
var flag = true;
$('#id').on('compositionstart',function(){
flag = false;
})
$('#id').on('compositionupdate',function(){
setTimeout(function(){
if(flag){
console.log(1);
}
},0)
$('#id').on('compositionend',function(){
flag = true;
})
var flag = true;
$('#div-detail').delegate('#sclt-div input', 'input', function () {
if (!flag) // All by default . Input method time truncation
CustomerList($(this).val());
}).on('compositionstart', function () {
flag = true;
console.log(' typewriting , Entry start ');
}).on('compositionend', function () {
flag = false;
CustomerList($('#sclt-div input').val()); // stay input After performing So you need to call it manually
console.log(' typewriting , End of input ');
}); Official explanation :( Mainstream browsers are compatible )
1、compositionstart: Triggered before the input of a text , That is, input a required text ( Start with the first letter ) Or when voice input starts .
2、compositionupdate visit data: The new character being inserted ;
3、compositionend visit data: All characters inserted
边栏推荐
- Regular expression conversion to corresponding text gadget
- Talk about HART Protocol
- Wireshark packet capture tool basic use
- In depth explanation of CAS is necessary for interview practice
- Is it safe to open an account online? How about Galaxy Securities
- 疫情隔离区订餐系统的开发
- Ali II: why do MySQL indexes use b+ trees instead of jump tables?
- 吉利星瑞:从产品技术赋能到文化自信
- College students downloaded 2578 documents abnormally, and the IP of the University of Social Sciences of China was banned by a database
- IDM downloader free high-quality win download tool without restrictions
猜你喜欢

没有需求文档,拒绝开发?

DOM series prohibit selected text and prohibit right-click menu

PMP备考心得 | 好的习惯、好的过程、好的结果

DOM系列之禁止选中文字和禁止右键菜单

UGUI源码解析——IMaskable

How many of the 50 classic computer network interview questions can you answer? (II)

K3S - 轻量级Kubernetes集群

Camera IQ: 76% of consumers have experienced AR, and 49% are willing to share ar advertisements

How many of the 50 classic computer network interview questions can you answer? (III)

NodeJS 基于 Dapr 构建云原生微服务应用,从 0 到 1 快速上手指南
随机推荐
Flutter 3.0
Day3 POC and exp learning Pikachu brute force cracking with token
Is it safe for CICC fortune to open an account? How to buy stocks
【并发编程】第二章:从核心源码深入ReentrantLock锁
【微信小程序】开发入门篇(二)
元宇宙并不是一个像互联网一样将流量看成是终极追求的存在
UGUI源码解析——IMaskable
视频点播中相关分辨率说明
讲一讲HART协议
UGUI源码解析——StencilMaterial
Ali II: why do MySQL indexes use b+ trees instead of jump tables?
ADB 命令结合 monkey 的简单使用,超详细
买reits基金一定赚钱吗 开户安全吗
【云原生】风云暗涌的时代,DBA们的利刃出鞘了
发现了一个好用到爆的数据分析利器
BGP联邦实验
差分数组操作的一些性质
Canal realizes MySQL data synchronization
Must I make money by buying REITs funds? Is it safe to open an account
Pagoda installation hyperf