jquery 点击报表中带单选框的一行 单选框选中
jquery 点击表格中带单选框的一行 单选框选中
需求RT
我自己写了但是发现只能使用一次
即全部点遍后 第二次再点击就失效了
网上找的貌似也是我这样的方法
求大神们看看。。![jquery 点击报表中带单选框的一行 单选框选中 jquery 点击报表中带单选框的一行 单选框选中](/default/index/img?u=aHR0cDovL3d3dy5teWV4Y2VwdGlvbnMubmV0L2ltZy8yMDE0LzAyLzI0LzEyNDc0MTI4MjQuZ2lm)
代码:
------解决方案--------------------
引用本地的jquery.js可以运行 没问题
需求RT
我自己写了但是发现只能使用一次
即全部点遍后 第二次再点击就失效了
网上找的貌似也是我这样的方法
求大神们看看。。
代码:
<!DOCTYPE html>
<html>
<head>
<title>text</title>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(function(){
$("#table_list tr:gt(0)").click(function(){
$(this).find(":radio").attr("checked",true);
});
});
</script>
</head>
<body>
<div id="table_list">
<table border="1" cellspacing="0" cellpadding="0" width="100%">
<tr>
<th></th>
<th>用户名</th>
<th>创建时间</th>
</tr>
<tr>
<td><input id="radiobox1" name="radiobox" type="radio" value="1" ></td>
<td>aaa</td>
<td>aaa</td>
</tr>
<tr>
<td><input id="radiobox2" name="radiobox" type="radio" value="2" ></td>
<td>aaa</td>
<td>aaa</td>
</tr>
<tr>
<td><input id="radiobox3" name="radiobox" type="radio" value="3" ></td>
<td>aaa</td>
<td>aaa</td>
</tr>
</table>
</div>
</body>
</html>
------解决方案--------------------
引用本地的jquery.js可以运行 没问题