<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<script src="jquery-1.8.3.js"></script>
<body>
<table id="tableId" >
<tr>
<td>序号</td>
<td>内容</td>
</tr>
<tr>
<td>1</td>
<td>11</td>
</tr>
<tr>
<td>2</td>
<td>22</td>
</tr>
</table>
<script type="text/javascript">
<!--
$('#tableId tr:eq(1) td:eq(1)').css('color','red')// tr:eq(0) th:eq(0)需要tr或需要th自行选择
$('#tableId tr:eq(1)').attr("checked",true);
//-->
</script>
</body>
</html>
一进入页面,默认选中table的第一个tr
最新推荐文章于 2024-02-04 16:46:55 发布