---帮你修改完了。这下行了。。--------------
<html>
<head>
</head>
<style type="text/css">
td{font-size:14px;text-align:center}
input{border:none;width:100%;text-align:center}
</style>
<script type="text/javascript" defer="defer">
function getNum(src,yqt,wenjFenH,sqt,wenjFenHh)
{
var checks=document.getElementsByName(src);
for(var i=0;i<checks.length;i++)
{
if(checks[i].checked)
{
document.getElementsByName(sqt)[i].value=document.getElementsByName(yqt)[i].value;
document.getElementsByName(wenjFenHh)[i].value=document.getElementsByName(wenjFenH)[i].value;
}
else
{
document.getElementsByName(sqt)[i].value="0";
document.getElementsByName(wenjFenHh)[i].value="000-000";
}
}
}
</script>
<body>
<table border="1" style="border-collapse:collapse">
<tr><td>文件名称</td><td>文件(期号)</td><td>密级</td><td>应清退份数</td><td>文件份号</td><td>存档份数</td><td>文件份号</td><td>实清退份数</td><td>文件份号</td><td>丢失份数</td><td>文件份数</td><td>是否清退</td></tr>
<tr><td>厅字</td><td>19</td><td>机密</td><td><input type="text" name="yqt1" value="1"></td><td><input type="text" name="wenjFenH1" value="441-441"></td><td></td><td></td><td><input type="text" name="sqt1" value="0"></td><td><input type="text" name="wenjFenH4" value="000-000"></td><td></td><td></td><td><input type="checkbox" name="ck" onclick="getNum('ck','yqt1','wenjFenH1','sqt1','wenjFenH4')"></td></tr>
<tr><td>厅字</td><td>21</td><td>秘密</td><td><input type="text" name="yqt1" value="1"></td><td><input type="text" name="wenjFenH1" value="441-441"></td><td></td><td></td><td><input type="text" name="sqt1" value="0"></td><td><input type="text" name="wenjFenH4" value="000-000"></td><td></td><td></td><td><input type="checkbox" name="ck" onclick="getNum('ck','yqt1','wenjFenH1','sqt1','wenjFenH4')"></td></tr>
<tr><td>中办发</td><td>2</td><td>秘密</td><td><input type="text" name="yqt1" value="2"></td><td><input type="text" name="wenjFenH1" value="614-615"></td><td></td><td></td><td><input type="text" name="sqt1" value="0"></td><td><input type="text" name="wenjFenH4" value="000-000"></td><td></td><td></td><td><input type="checkbox" name="ck" onclick="getNum('ck','yqt1','wenjFenH1','sqt1','wenjFenH4')"></td></tr>
</table>
</body>
</html>
温馨提示:答案为网友推荐,仅供参考