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?
Install mysql under win10 1. Download MySQL from ...
1. Time formatting and other methods It is recomm...
◆Add to favorites illustrate Click to add your we...
Table of contents Determine whether a record alre...
Today, I fell into the trap again. I have encount...
Table of contents 1. Registering custom instructi...
Table of contents Preface 1. JDBC timeout setting...
Let me first introduce an interesting property - ...
Vue+Openlayer uses modify to modify elements. The...
Learning objectives: Learn to use Windows system ...
Automatic web page refresh: Add the following code...
Although Microsoft has done a lot of research and ...
This article shares the specific code for React t...
When doing DB benchmark testing, qps and tps are ...
Table of contents 1. Operation elements 1.1. Chan...