Today I saw a blog post about input events, and on a whim I sorted out the relevant information. event: function changeVal(value){ console.log($(value).val())} onchange: The onchange event is triggered only when the previous and next content changes and loses focus. <input type="text" value="" onchange="changeVal(this)"> oninput: The oninput event is triggered when the value changes. <input type="text" value="" oninput="changeVal(this)"> There is also an onpropertychange event, which has a similar effect to oninput, but is specific to IE! And it didn’t work when I tested it, I was totally confused. . . Replenish: Cases where oninput and onpropertychange fail: oninput event: (1) When the value is changed in the script, it will not be triggered; (2) It will not be triggered when selecting from the browser's automatic drop-down prompt; onpropertychange event: When input is set to disable=true, it will not be triggered. The above is all the content of the in-depth understanding of html form input monitoring brought to you by the editor. I hope you like it~ If you want to know more about game activities and game strategies, please continue to pay attention to this site. The editor of this site will bring you the best, most fun and freshest game information as soon as possible. For more exciting content, please visit jb51 game channel! |
>>: What is a MySQL tablespace?
1. Create users and authorize Creating users and ...
The following operation demonstrations are all ba...
Introduction: When using MySQL to create a table,...
This article summarizes various ways to implement...
When developing a website, you often need to use ...
A few days ago, the library said that the server ...
Version 1.4.2 Official Documentation dockerhub st...
1. Introduction When a web project is published o...
download Download address: https://redis.io/downl...
This article uses examples to illustrate the usag...
When insert into employee values(null,'張三'...
Installing and deploying a private Docker Registr...
First of all, what is 404 and soft 404? 404: Simpl...
1. CSS writing format 1. Inline styles You can wr...
uniapp code <template> <view> <ima...