日期:2014-05-18 浏览次数:20480 次
$(function(){
$("#companies tbody tr td").each(function(i){
alert($(this).text());
});
});
------解决方案--------------------
$("#companies tbody tr td:not(:first)").click(function(){
alert($(this).html())
})
------解决方案--------------------
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题页</title>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#companies tr").each(function(){
$(this).find("td").not(":first").click(function(){
alert($(this).html())
})
})
})
</script>
</head>
<body>
<table id="companies" class="display">
<tbody>
<tr rel="0">
<td><input type="checkbox" style="margin:left" /></td>
<td>Emkay Entertainments</td>
<td>Nobel House, Regent Centre</td>
<td>Lothian</td>
</tr>
<tr rel="0">
<td><input type="checkbox" style="margin:left" /></td>
<td>Emkay Entertainments</td>
<td>Nobel House, Regent Centre</td>
<td>Lothian</td>
</tr>
</tbody>
</table>
</body>
</html>
------解决方案--------------------