<script type="text/javascript" language="javascript">
function GetAllCheckBox(CheckAll)
{
var items = document.getElementsByTagName("input");
for(var i=0;i<items.length;i++)
{
if(items[i].type=="checkbox")
{
items[i].checked = CheckAll.checked;
}
}
}
function checkPingJia()
{
var dengji = document.getElementById("<%=ddlDengJi.ClientID %>").value;
if(dengji.length == 0 || dengji == " ")
{
alert("请选择您要评价的等级!");
return false;
}
var items = document.getElementsByTagName("input");
var bool = true;
for(var i=0;i<items.length;i++)
{
if(items[i].type == "checkbox" && items[i].box !="111")
{
if(items[i].checked)
{
bool = false;
break;
}else
{
continue;
}
}
}
if(bool)
{
alert("请选择您要评价的员工!");
return false;
}
else
{
return true;
}
}
function CheckAllBox()
{
var items = document.getElementsByTagName("input");
var bool = true;
for(var i=0;i<items.length;i++)
{
if(items[i].type == "checkbox" && items[i].box !="111")
{
if(items[i].checked)
{
continue;
}else
{
bool = false;
break;
}
}
}
if(bool)
{
document.getElementById("checkAll").checked = bool;
}
else
{
document.getElementById("checkAll").checked = bool;
}
}
</script>
全选<inut id="chepckAll" type="checkbox" box="111" onclick="GetAllCheckBox(this)" />
<asp:CheckBox ID="chbSelect" onclick="CheckAllBox()" runat="server" CssClass='<%# Eval("GongHao") %>'/>