Is there a way to get informed when a script changes the value of an input type text.
I have
<input id='test' type='text' />
and a script
document.getElementById('test').value = 'bbb';
I want to be notified of the change of the text.
I know I could be notified by keydown,keyup, onblur etcetera (which works if I am trying to track user typing) but what about if the change is done programmatically ?
Many thanks
p.s.
No JQuery please or if jquery does it can somebody explain how it achieves it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…