解决方案 »
- Javascript横向显示记录问题
- table在js中的问题
- IE JScript第3种内存泄漏方式的问题。如果没有人能回答我得上微软那里问了。
- 我想实现增加行 可效果不理想!!这应该这样修饰
- 求助:怎样用脚本调用一个外部.exe程序啊,要能在Linux下执行的(在线等)
- 浏览器后退按钮的问题
- CSDN(类似新浪博客、网易等)的回复功能的实现
- 求 2013-11-26 14:27 jquery 验证日期 时间
- javacript 读取一系列checkbox 效率的问题
- 静儿工作上遇到了难题QQ:9813117
- jquery 弹框新增的HTML代码在哪里?
- 如何让网页在默认情况下全屏显示,包括平板、手机,附近测试地址
$("table tbody tr").last().css({"backgroud-color":"#ccc"})
})
<html>
<head>
<script src="http://www.w3school.com.cn/jquery/jquery-1.11.1.min.js">
</script>
<script>
$(document).ready(function(){
$("table tr:last").css('background-color','red');
});
</script>
</head>
<body>
<table border="1" bordercolor="#a0c6e5" style="border-collapse:collapse;"><tr> <td style="border: solid 1px #a0c6e5; height: 20px;">
1
</td> <td style="border: solid 1px #a0c6e5; height: 20px;">
1
</td> <td style="border: solid 1px #a0c6e5; height: 20px;">
1
</td>
</tr><tr>
<td style="border: solid 1px #a0c6e5; height: 20px;">
2
</td> <td style="border: solid 1px #a0c6e5; height: 20px;">
2
</td> <td style="border: solid 1px #a0c6e5; height: 20px;">
2
</td>
</tr><tr>
<td style="border: solid 1px #a0c6e5; height: 20px;">
3
</td> <td style="border: solid 1px #a0c6e5; height: 20px;">
3
</td> <td style="border: solid 1px #a0c6e5; height: 20px;">
3
</td>
</tr></table>
</body>
</html>
<table>
<tbody>
<tr><td>aaaa</td><td>sssssssssss</td></tr>
<tr><td>aaaa</td><td>sssssssssss</td></tr>
<tr><td>aaaa</td><td>sssssssssss</td></tr>
</tbody>
</table>
<script>$('table tr:last').css('background','red')</script>