51Testing软件测试论坛

标题: 这样的webtable怎么处理? [打印本页]

作者: lyscu    时间: 2008-4-18 16:02
标题: 这样的webtable怎么处理?
目的:
我想在列出的员工中依次选中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>&nbsp;</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">&nbsp;</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">&nbsp;员工姓名</td>
    <td width="0" bgcolor="#666666"><img src="images/spacer.gif" width="1" height="1"></td>
    <td width="23%" bgcolor="#DDEBEC" class="a9px">&nbsp;所属部门</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">&nbsp;
            <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">&nbsp;刘
    </td>
    <td width="0" bgcolor="#666666"><img src="images/spacer.gif" width="1" height="1"></td>
    <td width="23%" bgcolor="#FFFFFF" class="a9px">&nbsp;
   
                        移动平台服务部
   
    </td>
    <td width="0" bgcolor="#676664"><img src="images/spacer.gif" width="1" height="1"></td>
    <td width="46%" bgcolor="#FFFFFF" class="a9px">&nbsp;
            <a href="/badu/editperson.do?employeeID=liu036">
            <img src="admin/images/icon2.gif" alt="编辑员工信息" width="16" height="14" border="0"></a>
            &nbsp;
            <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>
作者: lyscu    时间: 2008-4-18 16:03
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width="10%" height="25" bgcolor="#FFFFFF" align="center">&nbsp;
            <input name="mobileNum" type="checkbox" class="text" onclick="relate();" value="13880880003">
            <div style="display:none">
            <input name="employeeID" type="checkbox" value="wanghh"></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">&nbsp;王
    </td>
    <td width="0" bgcolor="#666666"><img src="images/spacer.gif" width="1" height="1"></td>
    <td width="23%" bgcolor="#FFFFFF" class="a9px">&nbsp;
   
                        移动平台服务部
   
    </td>
    <td width="0" bgcolor="#676664"><img src="images/spacer.gif" width="1" height="1"></td>
    <td width="46%" bgcolor="#FFFFFF" class="a9px">&nbsp;
            <a href="/badu/editperson.do?employeeID=wanghh">
            <img src="admin/images/icon2.gif" alt="编辑员工信息" width="16" height="14" border="0"></a>
            &nbsp;
            <a href="admin/add_position.jsp?employeeID=wanghh">
            <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>

<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width="10%" height="25" bgcolor="#FFFFFF" align="center">&nbsp;
            <input name="mobileNum" type="checkbox" class="text" onclick="relate();" value="13880880001">
            <div style="display:none">
            <input name="employeeID" type="checkbox" value="000000"></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">&nbsp;谢
    </td>
    <td width="0" bgcolor="#666666"><img src="images/spacer.gif" width="1" height="1"></td>
    <td width="23%" bgcolor="#FFFFFF" class="a9px">&nbsp;
   
                        管理部
   
    </td>
    <td width="0" bgcolor="#676664"><img src="images/spacer.gif" width="1" height="1"></td>
    <td width="46%" bgcolor="#FFFFFF" class="a9px">&nbsp;
            <a href="/badu/editperson.do?employeeID=000000">
            <img src="admin/images/icon2.gif" alt="编辑员工信息" width="16" height="14" border="0"></a>
            &nbsp;
            <a href="admin/add_position.jsp?employeeID=000000">
            <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>

<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr>
    <td width="10%" height="25" bgcolor="#FFFFFF" align="center">&nbsp;
            <input name="mobileNum" type="checkbox" class="text" onclick="relate();" value="13880880002">
            <div style="display:none">
            <input name="employeeID" type="checkbox" value="999999"></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">&nbsp;周
    </td>
    <td width="0" bgcolor="#666666"><img src="images/spacer.gif" width="1" height="1"></td>
    <td width="23%" bgcolor="#FFFFFF" class="a9px">&nbsp;
   
                        技术支撑中心
   
    </td>
    <td width="0" bgcolor="#676664"><img src="images/spacer.gif" width="1" height="1"></td>
    <td width="46%" bgcolor="#FFFFFF" class="a9px">&nbsp;
            <a href="/badu/editperson.do?employeeID=999999">
            <img src="admin/images/icon2.gif" alt="编辑员工信息" width="16" height="14" border="0"></a>
            &nbsp;
            <a href="admin/add_position.jsp?employeeID=999999">
            <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>

</div>
</form>
</body>
</html>
作者: lyscu    时间: 2008-4-18 16:06
F:\ly\QTP\question\eroor.bmp
再上传一次图片
作者: lyscu    时间: 2008-4-18 16:07
还是不成功?!郁闷
作者: 鹭岛    时间: 2008-4-18 17:40
晕。....狂晕~~~~~~~~
代码就算了。。。弄个图或者地址出来比较实际
作者: 568529774    时间: 2010-3-3 14:46





欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2