1。当一个表格的某一行被点击的时候,这一行的背景色就变为红色,当这一行再次被点击时,就变成原来一样的背景色。
$(document).ready(function(){
$("tr").live("click",function(){
if($(this).css("background")=="red"){
$(this).css("background","");
}else{
$(this).css("background","red");
$("tr").not($(this)).css("background","");
}
});
});