|
目的:
我想在列出的员工中依次选中checkbox,然后进行编辑。但在获取总行数的时候碰到问题,因为每行都是一个<table></table>,图形和网页的源码如下:
F:\ly\QTP\question\eroor.bmp
</script>
<form action="/badu/staffdel.do" method=post name="stafflist">
<table width="100%" height="70" border="0" cellpadding="0" cellspacing="0">
<tr background="images/b.jpg">
<td width="1%" height="37" background="admin/images/b.jpg"><img src="admin/images/a.jpg" width="7" height="70"></td>
<td width="99%" valign="bottom" background="admin/images/b.jpg">
<table width="100%" height="42" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="92%" height="41"> </td>
<td width="3%" valign="top">
<a href="/badu/admin/changepassword.jsp" title="修改管理员密码">
<img src="/badu/admin/images/password.gif" width="30" height="30" border="0"></a></td>
<td> </td>
<td width="3%" valign="top">
<a href="/badu/help/index1.htm" target="_blank" title="帮助">
<img src="/badu/admin/images/help.gif" width="31" height="29" border="0"></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80%" class="a10px"><strong>员工列表</strong></td>
<td height="25" align="right" class="b9px">
<a href="#" title="添加员工"> </a>
<table width="148" height="25" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top"><a href="#" title="添加员工">
<img src="admin/images/tianjia.jpg" width="60" height="21" border="0" onClick="add();"></a></td>
<td width="28"> </td>
<td valign="top"><input type="image" src="admin/images/shanchu.jpg" width="60" height="21" onClick="check()"></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#002D96"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3" bgcolor="#CCCCCC"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#002D96"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" height="27" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="80%" class="b9px"><div align="right">
<a href="#" onclick="sendsms();"><img src="images/message.gif" border="0" width="16" height="16"></a></div></td>
<td width="20%" height="27">
<div align="left" class="style2 a9px">
<a href="#" class="c9px" onclick="sendsms();">向所选员工发送员工号和密码</a></div></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#002D96"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<div id="list_staff" style="height:468;position:relative;left:0;width:100%;overflow:auto;scrollbar-face-color:ADD7D6;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr class="locked_Top">
<td width="10%" height="30" bgcolor="#DDEBEC" align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="45%" align="right" valign="bottom"><span class="a9px style2">全选</span> </td>
<td width="55%" align="left">
<input name="selectall" type="checkbox" class="text" onClick="allchecked()" value=""></td>
</tr>
</table>
</td>
<td width="0" bgcolor="#666666"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="21%" bgcolor="#DDEBEC" class="a9px" align="left"> 员工姓名</td>
<td width="0" bgcolor="#666666"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="23%" bgcolor="#DDEBEC" class="a9px"> 所属部门</td>
<td width="0" bgcolor="#676664"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="46%" bgcolor="#DDEBEC" class="a9px"> </td>
</tr>
<tr bgcolor="#99CEF8">
<td height="1" colspan="7"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%" height="25" bgcolor="#FFFFFF" align="center">
<input name="mobileNum" type="checkbox" class="text" onclick="relate();" value="13880880004">
<div style="display:none">
<input name="employeeID" type="checkbox" value="liu036"></div>
</td>
<td width="0" bgcolor="#666666"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="21%" height="30" bgcolor="#FFFFFF" class="a9px"> 刘
</td>
<td width="0" bgcolor="#666666"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="23%" bgcolor="#FFFFFF" class="a9px">
移动平台服务部
</td>
<td width="0" bgcolor="#676664"><img src="images/spacer.gif" width="1" height="1"></td>
<td width="46%" bgcolor="#FFFFFF" class="a9px">
<a href="/badu/editperson.do?employeeID=liu036">
<img src="admin/images/icon2.gif" alt="编辑员工信息" width="16" height="14" border="0"></a>
<a href="admin/add_position.jsp?employeeID=liu036">
<img src="admin/images/icon1.gif" alt="增加职务" width="16" height="14" border="0"></a>
</td>
</tr>
<tr>
<td background="images/right5.jpg" height="1" colspan="7"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table> |
|