///isdelete,power是传进来的参数

if(isdelete=='True')//$("input[@type=radio]").attr("checked",'10');
        $("input[name='addisdelete'][value='1']").attr("checked", true);
     else
        $("input[name='addisdelete'][value='0']").attr("checked", true);
     var str= new Array();  
     str=power.split(",");
     for (i=0;i<str.length ;i++ ){$("input[name='addpower'][value='"+str[i]+"']").attr("checked", true);}
     //兼容IE6
     var isIE=(!!window.ActiveXObject);
     var isIE6=(isIE&&!window.XMLHttpRequest);
     var isIE8=isIE&&!!document.documentMode;
     var isIE7=isIE&&!isIE6&&!isIE8;
     if (isIE&&(isIE6||isIE7)){if(isdelete=='True')
        $("input[name='addisdelete'][value='1']").attr("defaultChecked", true);
     else
        $("input[name='addisdelete'][value='0']").attr("defaultChecked", true);
     for (i=0;i<str.length ;i++ ){$("input[name='addpower'][value='"+str[i]+"']").attr("defaultChecked", true);}
     }

posted on 2012-04-24 17:26  Haydy  阅读(550)  评论(0编辑  收藏  举报