Under IE, when a property of an HTML element changes, it can be captured instantly via Onpropertychange.
OnChange must also cause the current element to lose Focus (onblur) when the property value changes to activate the event.
To understand this, we find that the effect of Onpropertychange is what we want, but unfortunately, it only works under IE. Can we find another time to replace Onpropertychange?
Through the data learned that in other browsers can use the Oninput event to achieve the same effect, it is very good, we just need to distinguish the IE browser can be.
If you are writing the registration time directly in the page, then the following can be implemented:
oninput= "alert (this.value);" onpropertychange= "alert (this.value)"
PropertyName: is used to get which property has been modified.
<input type= "text" value= "xxx" id= "xx" onclick= "this.myprop= ' xx '" > <script type= "Text/javascript" > document.getElementById (' xx '). attachevent (' Onpropertychange ', function (o) { //traversal
For (var item in O) { alert (item+ ":" +o[item]); }
Popup Properties and Values
alert (o.propertyname);
}); </script>
Onchange= "Window.alert (' triggering events, handling things ')"
Onkeypress= "if (event.keycode==13) {Window.alert (' trigger event, handle things '); return false;}" Enter trigger event and process
Note: The return false must be added to the onkeypress event, and the statement avoids the loss of input entries.
Input _ text box enter or lose cursor trigger event