<script language="javascript">
function ccBoxMes(obj,status,str){
var abc=obj+"1";
if (abc=="undefined1"){
alert("当前没有可供选择的"+str+"!");
return false;
}else{
var a=0;
if (obj.length>=1){
for(var i=0;i<obj.length;i++){
if (obj[i].checked==true){
a=a+1;
}
}
}else{
if (obj.checked==true){
a=a+1;
}
}
if (a==0){
alert("没有选中"+str+"!");
return false;
}
if (status==0&&a>1){
alert("只能选择一个"+str+"!");
return false;
}
}
return true;
}
function chk(ch){
if(ch.checked==true){
var checkb=document.getElementsByName("parentId");
for(i=0;i<checkb.length;i++)
{
checkb[i].checked="";
}
ch.checked=true;
}
}
function addTarget(url){
if(ccBoxMes(frm.parentId,1,"评价指标")==true){
document.frm.action = url;
document.frm.submit();
}
}
</script>
<form name="frm" id="frm" method="post">
<table width="96%" border="0" align="center" cellpadding="0"
cellspacing="0" class="ResultCollectTable">
<tr align="center">
<td>
<input type="checkbox" name="parentId" value="1" onClick="chk(this);"/></td>
<td>
<input type="checkbox" name="parentId" value="2" onClick="chk(this);"/></td>
<td>
<input type="checkbox" name="parentId" value="3" onClick="chk(this);"/></td>
</tr>
</table>
</form>
<button class=btn1_mouseout onClick="addTarget('#')"
onMouseOver="this.className='btn1_mouseover'"
οnmοuseοut="this.className='btn1_mouseout'" title="添加">
添加风险分类偏离值
</button>