解决方案 »

  1.   

    $this2.parent().find("input[type='checkbox']:eq(1)").checked; 这样写试试
      

  2.   

    对了,写多了个function trytr1()但还是没反应。
      

  3.   

    $(document).ready(function(){
    function trytr1(){
              $this2=$("input[value=55]");
      $this2.parent().find("input[type='checkbox']").eq(1).checked; 
      alert("try");    
    }
    trytr1();
    })
    没反应
    </script>
    这只是申明了一个trytr1函数,并没有运行他,加上绿色部分,就是立即运行了
      

  4.   

    我不知道你想要怎么样选中
    $("input[value=55]").prev().children("input").prop("checked", true);这个是选中value=55的,可以参照改成你想要的
      

  5.   

    楼上是可以,但我要模拟点击,点击选择后其它form的不可选,但按楼上的或chick()都只是选择,其它form的还可选。
      

  6.   


    function trytr1(){
      $this2=$("input[value=55]");
      $this2.parent().find(":checkbox").prop("disabled",true).end().end().prop({"disabled":false,"checked",true});     
    }
      

  7.   

    额,刚打错了,最后面那个逗号改成冒号。function trytr1(){
      $this2=$("input[value=55]");
      $this2.parent().find(":checkbox").prop("disabled",true).end().end().prop({"disabled":false,"checked":true});        
    }
    试试
      

  8.   

    谢谢楼上,但你可能没看清我的js,你这样只是同个表单的checkbox
      

  9.   

    js原生的方法,和jQuery的方法是不能混用的。你可以先把jQuery对象变成原生的对象,再按照你上面的的方法使用,比如:
    $this2.parent().find("input[type='checkbox']").eq(1)[0].checked; 理论上,这样也只是获取到你目标元素的属性值吧,所以还需要赋值才能修改它的状态。
    没有测试,试试看吧。
      

  10.   

    $('[value=55]').parents('form').find(':checkbox:eq(1)').click().prop("checked",true);
      

  11.   

    只通过 shu 和 c 两个类访问$('[value=55]').parents('.shu').find('.c').click().prop("checked",true);
    更贴近你的思路