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. What is phantom reading? In a transaction, aft...
Use v-model to bind the paging information object...
question: The commonly used command "ll"...
The team replaced the new frame. All new business...
Effect If you use it, please optimize the code an...
VMware12.0+Ubuntu16.04+MySQL5.7.22 installation t...
Before using idea to write JSP files, you need to...
We will install phpMyAdmin to work with Apache on...
This tutorial shares the installation and configu...
Classification of CSS styles 1. Internal style --...
jQuery realizes the effect of theater seat select...
Table of contents 1. Routing related objects 2. L...
This article shares the specific code for importi...
Table of contents 1. What is Promise 2. Basic usa...
This article uses an example to describe how MySQ...