2008-10-02 3 views

답변

24
$(function() { 
    $("table#mytable td").mouseover(function() { 
     //The onmouseover code 
    }).click(function() { 
     //The onclick code 
    }); 
}); 
1

시작하기 전에 다음 코드로 작업하십시오. 그것은 단지 당신이 필요로하는 것을해야합니다.

$("td").hover(function(){ 
    $(this).css("background","#0000ff"); 
}, 
function(){ 
    $(this).css("background","#ffffff"); 
}); 

this as a reference, which is where I pulled that code을 사용할 수 있습니다.

관련 문제