日期:2014-05-17 浏览次数:20946 次
<script type="text/javascript" language="javascript">
//全选
function CheckAll(chb) {
var aa = document.getElementsByTagName("input");
for (var i = 0; i < aa.length; i++) {
if (aa[i].type == "checkbox" && aa[i].name.indexOf(chb) > -1) {
aa[i].checked = true;
}
}
}
//反选
function RemoveAll(chb) {
var aa = document.getElementsByTagName("input");
for (var i = 0; i < aa.length; i++) {
if (aa[i].type == "checkbox" && aa[i].name.indexOf(chb) > -1) {
aa[i].checked = false;
}
}
}
</script>
<asp:CheckBoxList ID="ChbQueryUser" runat="server">
</asp:CheckBoxList>
<a href="javascript:void(CheckAll('ChbQueryUser'))">全选</a>
protected void BtnDeleteQueryUser_Click(object sender, EventArgs e)
{
for (int i = 0; i < ChbQueryUser.Items.Count; i++)
{
if (ChbQueryUser.Items[i].Selected == true)
{
int ID = Convert.ToInt32(ChbQueryUser.Items[i].Value);
am.DeleteAuthority(ID, 1);
bind();
bindQuery();
&