//前提是你要导入jquery的库
$(function(){
$("#tab tbody tr:odd").css("backgroundColor","red"); //奇数行
$("#tab tbody tr:even").css("backgroundColor","red"); //偶数行
$("#tab tbody tr:eq(2)").css("backgroundColor","red"); //索引等于2
$("#tab tbody tr:gt(2)").css("backgroundColor","red"); //索引大于2
$("#tab tbody tr:lt(2)").css("backgroundColor","red"); //索引小于2
});
html代码
<table id="tab" border="1" cellpadding="0" cellspacing="0" width="70%">
<tbody>
<tr>
<td>a</td><td>a</td><td>a</td><td>a</td>
</tr>
<tr>
<td>b</td><td>b</td><td>b</td><td>b</td>
</tr>
<tr>
<td>c</td><td>c</td><td>c</td><td>c</td>
</tr>
<tr>
<td>d</td><td>d</td><td>c</td><td>c</td>
</tr>
</tbody>
</table>
分享到:
相关推荐
jquery插件jquery-ui-1.8.18.custom.min.js
最新jquery-ui-1.11.2日期控件,官网下载内涵图片和自己添加的中文辅助jquery-ui-timepicker-zh-CN.js,经过本人测试绝对可以用,不知道怎么用的百度上找个例子即可,需要导入的包 ${ctx}/plugins/jquery-ui-1.11.2/...
struts2-jquery-plugin-3.1.0.jar
jquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-uijquery-ui
jquery-ui-1.8.2.custom.min.js,jquery-ui-1.8.4.custom.css
jquery-ui-日期框扩展成时间框 jquery-ui时间框 基于别人的代码进行修改 jquery-ui-1.8.16.custom.css文件末尾加入以下代码 .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; } .ui-timepicker-div dl{ ...
这里包含jquery-ui-1.8.16.custom.min.js/jquery-ui-1.8.16.custom.css,我费了好长时间找到的,此东西可以配合jQuery UI开发指南一书使用。
jquery插件jquery-ui-1.8.2.custom.min.js
<script src="./public/js/jquery-ui-1.10.3.min.js"> <script src="./public/js/jquery.datepicker-zh-CN.js"></script> <link href="./public/css/jqueryui/jquery-ui-1.10.3.min.css" rel="stylesheet"> $( "#...
最新版jquery-1.6.4-vsdoc.js jQuery的VS智能提示插。压缩包内包含jquery-1.6.4.js jquery-1.6.4.min.js jquery-...2、切记:两个文件的文件名不能修改,并且只要引用jquery-1.6.4.js而不要引用jquery-1.6.4-vsdoc.js。
jquery-ui-1.8.18.custom
jquery-easyui-EDT-1.5.2-build1 jquery-easyui-EDT-1.5.2-build1
jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-ui-1.8.16jquery-...
jQuery版本迁移辅助插件,如果您使用的低版本jQuery改为高版本后出现错误,可以试试这个插件。用来检测和恢复在jQuery1.9版本中已删除或已过时的API。jquery-migrate-1.2.1.js,jquery-migrate-1.2.1.min.js
jquery.mobile-1.4.5 jquery.mobile-1.4.5 jquery.mobile-1.4.5
jquery-ui-1.7.3.custom JQUERY UI
jquery-ui-1.7.3.custom 完整开发包
jquery-ui-1.9.2.custom.min.js
jquery-1.4.2-vsdoc.js jquery-1.4.4-vsdoc.js
jquery-ui-1.10.3.js 版本 1积分下载 jquery-ui-1.10.3.js 版本 1积分下载 jquery-ui-1.10.3.js 版本 1积分下载