62,041
社区成员
发帖
与我相关
我的任务
分享
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<script src="jquery-1.3.2-vsdoc.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#btnTest").click(function() {
var trCount = $("#tabAbc tr").size(); //得到这个表格有几行
$($("#tabAbc tr").eq(trCount - 1).hide()); //这是隐藏这个表格的最后一行
});
});
</script>
</head>
<body >
<table id="tabAbc">
<tr>
<td>11</td> <td>12</td>
</tr>
<tr>
<td>21</td><td>22</td>
</tr>
</table>
<input id="btnTest" type="button" value="button" />
</body>
</html>