<script language="javascript" type="text/javascript">
    function ckall(e, obj) {
        if ($(e).attr("checked")!="checked") {
            $('#' + obj + ">input").removeAttr("checked"); 
        }
        else {
            $('#' + obj + ">input").attr("checked", "checked");  
        }
    }
</script>

 

<tr>  
    <td><%=this.FunctionName %></td>
    <td>
        <input id="chk_<%=this.ClientID %>" type="checkbox" onclick="ckall(this,'fun_<%=this.ClientID %>')"/>全选
        <span id="fun_<%=this.ClientID %>">
            <asp:CheckBox ID="ckinsert" runat="server"  Text="新增"/>
            <asp:CheckBox ID="ckedit" runat="server"  Text="编辑"/>
            <asp:CheckBox ID="ckdelete" runat="server"  Text="删除"/>
            <asp:CheckBox ID="ckview" runat="server"  Text="查看"/>
            <asp:CheckBox ID="ckexecute" runat="server" Text="执行" />
            <asp:CheckBox ID="cklist" runat="server"  Text="列表"/>
            <asp:CheckBox ID="ckprint" runat="server" Text="打印" />
        </span>
    </td>
</tr>

 posted on 2012-09-26 15:20  kakestar  阅读(170)  评论(0编辑  收藏  举报