我想用javascript对TD中的内容进行操作,当TD内容发生变化时,我会做其他事情。但似乎永远不会引发变更事件。的HTML:
<table><tr><td id='testTD'>Test</td></tr></table>
的JavaScript:
jQuery().ready(function(){
jQuery('#testTD').on('change', function(e){alert('td changed');});
jQuery('#testTD').append('something'); //why this did not raise the 'change' event for td?
});
任何想法?