var str = data.split("^");
   if(str[1] != 0){
   alert("该工号已有["+str[3]+"]权限");
   var num = str[2].split(",");
   for(var i= 0;i<num.length;i++){
   $("input[type=checkbox][value="+num[i]+"]").attr({ disabled:"disabled",checked:""});  
   }
   }else{
   $("input[type=checkbox]").removeAttr("disabled");
   }   }当checkbox从disabled变成可编辑的时候 ,我用
if($("input[name=interbene_type]").attr("checked") == true){
}else{alert("请选择权限");
return false;
}
获得用户的选择信息, 为啥得不到呢!求指教!

解决方案 »

  1.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <script type="text/javascript" src="jquery-1.4.2.min.js"></script>
    <script type="text/javascript">
    $(function(){
    $("#chk").attr({"disabled":true});
    $("#btn").click(function(){
    $("#chk").removeAttr("disabled");
    });
    $("#chk").click(function(){
    alert($(this).attr("checked"));
    });
    });
    </script>
    </head><body>
    <input type="checkbox" id="chk" />
    <input type="button" id="btn" value="test" />
    </body>
    </html>
      

  2.   

    是不是
    $("input[name=interbene_type]") 没有获取到checkbox对象呢?
    你可以用 checkbox Id 试一试。