日期:2014-05-16  浏览次数:20411 次

~~~~~~~~~~~~jquery如何判断table当前行第一列是否是radio,如果是就选中!~~~~~~~~~~~~~~~~~~~
如何判断第一列是radio,如果是第一列才选中。

$("tbody>tr",this).click(function(){
  $(this).find(":radio").prop("checked", true);     
});

------解决方案--------------------
用jQuery方法很费劲
用dom了
//var $that = $("#tt");
$("tbody>tr",this).click(function(){
  var $a = this.cells[0].firstChild;
  var $b = $a.type;
  if($b == 'radio'){
  $($a).prop("checked", true);
  }

});