전체 테이블을 다시로드하지 않고 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 웹 사이트에 자세히 설명되어 있습니다. http://docs.jquery.com/
제휴하지 않습니다 StackOverflow