我选择的是组长返回的却是经理 那里错了?
附代码:
<html>
<head>
<title>岗位选择</title>
<META http-equiv="Content-type" content="text/html; charset=Gb2312">
<link href="../css/style.css" type="text/css" rel="stylesheet">
<script language="JavaScript" >
function EndChoose()
{
var inputs =document.getElementsByName("mycheck");
var checkNo=0;
for(var i= 0;i<inputs.length;i++)
{
if(inputs[i].type=="checkbox"&&inputs[i].checked)
{
checkNo++;
}
if(checkNo>1)
{
alert("只允许选择一行")
}
else
{
window.opener.document.getElementById ("SuoShuGW").value=document.getElementById("GangWeiMC"+inputs[i].id).innerText;
window.opener.document.getElementById ("GangWeiBH").value=document.getElementById("GangWeiBH"+inputs[i].id).innerText;
window.close();
}
}
}
</script>
</head>
<body onLoad="">
<form name="BiaoDan" id="BiaoDan" action="" method="post">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td >岗位选择</td>
</tr>
</table>
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td>
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
<tr>
<td colspan="2">
<div id="tC" class="tScroll">
<table id="ChaXunJieGuo" class="tableline" width="100%" cellSpacing="1" cellPadding="2">
<tr>
<td align="center" nowrap width="2%" ></td>
<td noWrap align="center" >岗位名称</td>
<td noWrap align="center" >所属机构</td>
<td noWrap align="center" >岗位描述</td>
<td noWrap align="center" >岗位编号</td>
</tr>
<tr>
<td class="tablenr" nowrap>
<input type="checkbox" name="mycheck" id="0" >
<input type="hidden" value="0">
</td>
<td nowrap class="tablenr" id="GangWeiMC0">销售组长</td>
<td nowrap class="tablenr" id="SuoShuBM0">营业部</td>
<td nowrap class="tablenr" id="GangWeiMs0">销售小组负责人</td>
<td nowrap class="tablenr" id="GangWeiBH0">gangwei00005</td>
</tr>
<tr>
<td class="tablenr" nowrap>
<input type="checkbox" name="mycheck" id="1">
<input type="hidden" value="0">
</td>
<td nowrap class="tablenr" id="GangWeiMC1">销售经理</td>
<td nowrap class="tablenr" id="SuoShuBM1">营业部</td>
<td nowrap class="tablenr" id="GangWeiMs1">销售部门负责人</td>
<td nowrap class="tablenr" id="GangWeiBH1">gangwei00009</td>
</tr>
</table>
</div>
</td>
</tr>
<tr>
<td colspan="2">
<br/>
<input name="XuanZe" type="button" onclick="EndChoose();" value="确定">
<input name="FangQi" type="button" onclick="window.opener=null;window.close();" value="返回">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>