*/ 出自: 编程中国 http://www.bc-cn.net
*/ 作者: 放任一切
*/ 时间: 2007-7-18 编程论坛首发
*/ 声明: 尊重作者劳动,转载请保留本段文字
*/ --------------------------------------------------------------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>
<script language="javascript">
arr = new Array();
arr[0]=new Array("1","1");
arr[1]=new Array("1","2");
arr[2]=new Array("1","3");
arr[3]=new Array("1","4");
arr[4]=new Array("1","5");
arr[5]=new Array("1","6");
arr[6]=new Array("1","7");
arr[7]=new Array("1","9");
arr[8]=new Array("2","10");
arr[9]=new Array("2","11");
arr[10]=new Array("2","12");
arr[11]=new Array("2","13");
arr[12]=new Array("2","14");
arr[13]=new Array("2","16");
arr[14]=new Array("2","17");
arr[15]=new Array("3","18");
arr[16]=new Array("3","19");
arr[17]=new Array("3","20");
temp=18;
function ChangeLocation(mkzs,id){
if(document.form1.elements(mkzs).checked==true)
{
for(i=0;i<temp;i++)
{
if(arr[i][0]==id)
{
mk_name="mk_"+arr[i][1];
document.form1.elements(mk_name).checked=true;
}
}
}
else
{
for(i=0;i<temp;i++)
{
if(arr[i][0]==id)
{
mk_name="mk_"+arr[i][1];
document.form1.elements(mk_name).checked=false;
}
}
}
}
function Changemkz(mkzs,mks,mksz)
{
if(document.form1.elements(mks).checked==true)
{
document.form1.elements(mkzs).checked=true;
}
else
{
var mkshuzu;
var mkshuzu_zhi;
var z=0;
mkshuzu = mksz.split("*");
mkshuzu_zhi=mkshuzu.length;
//alert(mkshuzu_zhi);
for(i=0;i<=mkshuzu_zhi-2;i++)
{
if(document.form1.elements(mkshuzu[i]).checked==true)
{z=z+1;}
}
if(z==0)
{document.form1.elements(mkzs).checked=false;}
}
}
</script>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form id="form1" name="form1" method="post" action="">
<tr>
<td height="30"> </td>
</tr>
<tr>
<td align="right">
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="text_red">
<tr>
<td><input type="checkbox" name="mkz_1" value="checkbox" onClick="ChangeLocation('mkz_1','1')">
模块组一</td>
</tr>
<tr>
<td align="right">
<table width="95%" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td width="20%"><input type="checkbox" name="mk_1" value="checkbox" onClick="Changemkz('mkz_1','mk_1','mk_1*mk_2*mk_3*mk_4*mk_5*mk_6*mk_7*mk_9*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_2" value="checkbox" onClick="Changemkz('mkz_1','mk_2','mk_1*mk_2*mk_3*mk_4*mk_5*mk_6*mk_7*mk_9*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_3" value="checkbox" onClick="Changemkz('mkz_1','mk_3','mk_1*mk_2*mk_3*mk_4*mk_5*mk_6*mk_7*mk_9*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_4" value="checkbox" onClick="Changemkz('mkz_1','mk_4','mk_1*mk_2*mk_3*mk_4*mk_5*mk_6*mk_7*mk_9*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_5" value="checkbox" onClick="Changemkz('mkz_1','mk_5','mk_1*mk_2*mk_3*mk_4*mk_5*mk_6*mk_7*mk_9*')">
模块</td>
</tr>
</table>
<table width="95%" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td width="20%"><input type="checkbox" name="mk_6" value="checkbox" onClick="Changemkz('mkz_1','mk_6','mk_1*mk_2*mk_3*mk_4*mk_5*mk_6*mk_7*mk_9*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_7" value="checkbox" onClick="Changemkz('mkz_1','mk_7','mk_1*mk_2*mk_3*mk_4*mk_5*mk_6*mk_7*mk_9*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_9" value="checkbox" onClick="Changemkz('mkz_1','mk_9','mk_1*mk_2*mk_3*mk_4*mk_5*mk_6*mk_7*mk_9*')">
模块</td>
<td width="20%"></td>
<td width="20%"></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="text_red">
<tr>
<td><input type="checkbox" name="mkz_2" value="checkbox" onClick="ChangeLocation('mkz_2','2')">
模块组二</td>
</tr>
<tr>
<td align="right">
<table width="95%" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td width="20%"><input type="checkbox" name="mk_10" value="checkbox" onClick="Changemkz('mkz_2','mk_10','mk_10*mk_11*mk_12*mk_13*mk_14*mk_16*mk_17*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_11" value="checkbox" onClick="Changemkz('mkz_2','mk_11','mk_10*mk_11*mk_12*mk_13*mk_14*mk_16*mk_17*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_12" value="checkbox" onClick="Changemkz('mkz_2','mk_12','mk_10*mk_11*mk_12*mk_13*mk_14*mk_16*mk_17*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_13" value="checkbox" onClick="Changemkz('mkz_2','mk_13','mk_10*mk_11*mk_12*mk_13*mk_14*mk_16*mk_17*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_14" value="checkbox" onClick="Changemkz('mkz_2','mk_14','mk_10*mk_11*mk_12*mk_13*mk_14*mk_16*mk_17*')">
模块</td>
</tr>
</table>
<table width="95%" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td width="20%"><input type="checkbox" name="mk_16" value="checkbox" onClick="Changemkz('mkz_2','mk_16','mk_10*mk_11*mk_12*mk_13*mk_14*mk_16*mk_17*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_17" value="checkbox" onClick="Changemkz('mkz_2','mk_17','mk_10*mk_11*mk_12*mk_13*mk_14*mk_16*mk_17*')">
模块</td>
<td width="20%"></td>
<td width="20%"></td>
<td width="20%"></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table width="98%" border="0" cellpadding="0" cellspacing="0" class="text_red">
<tr>
<td><input type="checkbox" name="mkz_3" value="checkbox" onClick="ChangeLocation('mkz_3','3')">
模块组三</td>
</tr>
<tr>
<td align="right">
<table width="95%" border="0" cellpadding="0" cellspacing="0" class="text">
<tr>
<td width="20%"><input type="checkbox" name="mk_18" value="checkbox" onClick="Changemkz('mkz_3','mk_18','mk_18*mk_19*mk_20*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_19" value="checkbox" onClick="Changemkz('mkz_3','mk_19','mk_18*mk_19*mk_20*')">
模块</td>
<td width="20%"><input type="checkbox" name="mk_20" value="checkbox" onClick="Changemkz('mkz_3','mk_20','mk_18*mk_19*mk_20*')">
模块</td>
<td width="20%"></td>
<td width="20%"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</body>
</html>