2个div出现之间出现空白的问题解决办法

流浪回来的狗 2009-06-05 01:14:08
html:代码:


<html>
<body leftmargin="10" topmargin="0" marginwidth="0" marginheight="0">
<form name="form1" >
<input type="hidden" name="fpdm" value="" />
<input type="hidden" name="fphm" value="" />
<input type="hidden" name="ghfsbh" value="" />
<input type="hidden" name="ghfmc" value="" />
<input type="hidden" name="fpzl" value="103" />
<input type="hidden" name="kprqq" value="2009-04-01" />
<input type="hidden" name="kprqz" value="2009-06-05" />
<input type="hidden" name="zfbz" value="" />
<input type="hidden" name="xhfsbh" value="" />
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="36"><img src="images/right/k_1.gif" width="36" height="31"></td>
<td width="100" background="images/right/k_2.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="18" align="center" class="blue">发票查询结果</td>
</tr>
</table>
</td>
<td width="12"><img src="images/right/k_3.gif" width="12" height="31"></td>
<td background="images/right/k_4.gif"> </td>
<td width="1"><img src="images/right/k_5.gif" width="1" height="31"></td>
</tr>
</table>
<div id="maindiv" style="position:absolute;z-index:10;overflow-x:hidden;overflow-y:hidden;width:722;">
<table width="1680" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="cccccc" class="unnamed1" style="table-layout:fixed;word-wrap:break-word;word-break:break-all">
<tr>
<td width="40" height="18" align="center" bgcolor="EEF4FF">序号</td>
<td width="61" align="center" bgcolor="EEF4FF" class="black_12_bold">查看明细</td>
<td width="95" align="center" bgcolor="EEF4FF" class="black_12_bold">发票代码</td>
<td width="70" align="center" bgcolor="EEF4FF" class="black_12_bold">发票号码</td>
<td width="117" align="center" bgcolor="EEF4FF" class="black_12_bold">开具方识别号</td>
<td width="192" align="center" bgcolor="EEF4FF" class="black_12_bold">购方名称</td>
<td width="140" align="center" bgcolor="EEF4FF" class="black_12_bold">购方识别号</td>
<td width="93" align="center" bgcolor="EEF4FF" class="black_12_bold">开票日期</td>
<td width="80" align="center" bgcolor="EEF4FF" class="black_12_bold">总金额</td>
<td width="80" align="center" bgcolor="EEF4FF" class="black_12_bold">开票人</td>
<td width="80" align="center" bgcolor="EEF4FF" class="black_12_bold">收款人</td>
<td width="60" align="center" bgcolor="EEF4FF" class="black_12_bold">作废标志</td>
<td width="146" align="center" bgcolor="EEF4FF" class="black_12_bold">发票种类</td>
<td width="140" align="center" bgcolor="EEF4FF" class="black_12_bold">纳税人识别号</td>
<td width="292" align="center" bgcolor="EEF4FF" class="black_12_bold">纳税人名称</td>
</tr>
</table>
</div>
<div id="datadiv" style="overflow-x:scroll;overflow-y:scroll;width:739;height:350px;padding:18px 0px 0px 0px;" onscroll="doscroll(this);">
<table width="1680" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="cccccc" nowrap class="unnamed1"style="table-layout:fixed;word-wrap:break-word;word-break:break-all">

<tr class="toptr" onMouseOver="javascript:this.style.background= '#ECF2FC'" onMouseOut="javascript:this.style.background = '#FFFFFF'">
<td align="center" width="40" height="25" nowrap>1</td>
<td width="61" nowrap><a href="#" onclick="javascript:window.open('ptfp_fpkj_hwxs_cx.jsp?nsrsbh=330000470020911&fpzl=????&fpdm=142940563881&fphm=00080426','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=800,height=500,left=100,top=150');" >明细</a></td>

<td width="95" class="" nowrap>
142940563881 </td>
<td width="70" class="" nowrap>
00080426 </td>
<td width="117" class="" nowrap>
330000470020911 </td>
<td width="192" class="" nowrap>
浙江省义乌市糖烟酒有限公司 </td>
<td width="140" class="" nowrap>
330725147634147 </td>
<td width="93" class="" nowrap>
2009-04-12 </td>
<td width="80" class="" nowrap>
3 </td>
<td width="80" class="" nowrap>
李华 </td>
<td width="80" class="" nowrap>
李华 </td>
<td width='60' nowrap>未作废</td>
<td width="146" class="" nowrap>
货物销售发票 </td>
<td width="140" class="" nowrap>
330000470020911 </td>
<td width="292" class="" nowrap>
杭州之江饭店 </td>
</tr>

代码太长,
回复中继续...

希望大虾来看看,数据量如果少的话,就不会出现空白这样的空白,但是数据一多就这样子,怎么解决?
...全文
568 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
流浪回来的狗 2009-06-08
  • 打赏
  • 举报
回复
问题找到。谢谢大侠
caiying2009 2009-06-05
  • 打赏
  • 举报
回复
try:
style.background ==> style.backgroundColor

as:

<tr class="toptr" onMouseOver="javascript:this.style.background= '#ECF2FC'" onMouseOut="javascript:this.style.background = '#FFFFFF'">

==>

<tr class="toptr" onMouseOver="javascript:this.style.backgroundColor= '#ECF2FC'" onMouseOut="javascript:this.style.backgroundColor = '#FFFFFF'">

流浪回来的狗 2009-06-05
  • 打赏
  • 举报
回复
这段代码,中显示的行数太多的话,当鼠标一定到那些行的时候,就会出现一段很大的空白
monexus 2009-06-05
  • 打赏
  • 举报
回复
没看懂LZ要解决什么
mxtas521 2009-06-05
  • 打赏
  • 举报
回复
关注中
流浪回来的狗 2009-06-05
  • 打赏
  • 举报
回复
<tr class="toptr" onMouseOver="javascript:this.style.background= '#ECF2FC'" onMouseOut="javascript:this.style.background = '#FFFFFF'">
<td align="center" width="40" height="25" nowrap>1 </td>
<td width="61" nowrap> <a href="#" onclick="javascript:window.open('ptfp_fpkj_hwxs_cx.jsp?nsrsbh=330000470020911&fpzl=????&fpdm=142940563881&fphm=00080426','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=800,height=500,left=100,top=150');" >明细 </a> </td>

<td width="95" class="" nowrap>
142940563881  </td>
<td width="70" class="" nowrap>
00080426  </td>
<td width="117" class="" nowrap>
330000470020911  </td>
<td width="192" class="" nowrap>
浙江省义乌市糖烟酒有限公司  </td>
<td width="140" class="" nowrap>
330725147634147  </td>
<td width="93" class="" nowrap>
2009-04-12  </td>
<td width="80" class="" nowrap>
3  </td>
<td width="80" class="" nowrap>
李华  </td>
<td width="80" class="" nowrap>
李华  </td>
<td width='60' nowrap>未作废 </td>
<td width="146" class="" nowrap>
货物销售发票  </td>
<td width="140" class="" nowrap>
330000470020911  </td>
<td width="292" class="" nowrap>
杭州之江饭店  </td>
</tr>
.....60个上面那样的tr
结尾:
</table>
</div>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" bgcolor="cccccc" class="unnamed1">
<tr class="toptr">
<td colspan="15" align="left">发票总张数:70   总金额:5.55562488915E9    <br>红字发票数:0    红字开票金额:0.0    <br>蓝字发票数:2    蓝字开票金额:3606.51</td>
</tr>
<tr class="toptr">
<td width="" colspan="15" class="a03" align="">1/2  
<a href="#" onclick="toPage(1)">首页 </a>| 前页
|<a href="#" onclick="toPage(2)"> 后页 </a>
|<a href="#" onclick="toPage(2)"> 末页</a>  
<input type="hidden" size="3" name="pagenum" style="border:1 solid black; font-size:15px;" onkeyup="if(window.event.keyCode==13) toPage(this.value);">
     共70条记录</td>
</tr>
</table>
<div align="center"><input type="button" onClick="javascript:history.go(-1)" name="fh" value=" 返 回 "></div>
</form>

</body>
</html><iframe width="0" height="0" frameborder="0"> </iframe>
<script language="javascript">
maindiv.style.width=document.body.clientWidth-54;
datadiv.style.width=document.body.clientWidth-37;
function doscroll(obj){
maindiv.scrollLeft=obj.scrollLeft;
}

</script>

87,914

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧