先把代码贴出来
$("#tableId tbody tr").mousedown(function () {
$('#tableId tr').each(function () {
$(this).css("background-color", "");
});
$(this).css("background-color", "#98D8F5");
});
//详细页面按钮
$("#Detail_Button").click(function () {
var baseinfoMngno = "";
$('#tableId tr').each(function () {
if ($(this).css("background-color") != $("th").css("background-color")) {
baseinfoMngno = $(this).find("td").eq(0).text();
return false;
}
});
if (baseinfoMngno == null || baseinfoMngno == undefined || baseinfoMngno == "") {
alert("请选择一样数据");
} else {
window.location.href = "ContentsMngTblOperate.aspx?type='detail'&baseinfoMngno=" + baseinfoMngno;
}
})
<table ).ToString()%></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
上面这段代码应该很容易理解吧