1

TDのコンテンツをjavascriptで操作したいのですが、TDのコンテンツが変更されたら別のことをします。しかし、変更イベントは発生しないようです。HTML:

<table><tr><td id='testTD'>Test</td></tr></table>

ジャバスクリプト:

  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?
  });

何か案が?

4

2 に答える 2