テーブル全体をリロードせずにデータをhtmlテーブルにロードします
-
06-07-2019 - |
質問
tdタグの間に新しいデータをロードし、各タグにidを与えるとjQueryでtdタグの背景画像を変更することは可能ですか?
もしそうなら、どのように行われますか?
解決
// set the background of all td tags
$('td').css('backgroundImage', 'url('+url+')');
// set the content of a particular tag
$('td#someID').html(yourHtml);
// set the background and content of a specific tag
$('td#someID').html(yourHtml).css('backgroundImage', 'url('+url+')');
これらのすべては、jQuery Webサイトで詳細に文書化されています: http://docs.jquery.com/
所属していません StackOverflow