Today recorded I solve input value change monitoring, everyone must first think of onchange method. For real-time monitoring change with Onpropertychange, Oninput and other methods; However, onchange can not listen to the value of the script changes, for the onpropertychange can only implement IE monitoring is not compatible with all browser problems;
Thought for a long time, I found a good way to share with you one or two:
Suppose html:<input name= "temp" id = "Temp" value/>
JS assignment at the same time to do the following (focus before assignment, cancel focus after copying); JS code is as follows
$ ("#temp"). focus ();
$ ("#temp"). Val ("assignment operation");
$ ("#temp"). blur ();
And then it's listening:
$ ("#temp"). Bind (' blur change ', function () {
Alert ("The value has changed and changed to:" +$ ("#temp"). Val ());
Event handling
})
How to listen for input script assignment