Start observing 'input' event instead of 'change'.(开始观察“输入”事件而不是“改变”事件。)
jQuery('#some_text_box').on('input', function() {
// do your stuff
});
...which is nice and clean, but may be extended further to:(...很干净,但可以扩展到:)
jQuery('#some_text_box').on('input propertychange paste', function() {
// do your stuff
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…