您现在的位置: 设计龙 >> 网页设计 >> javascript >> 正文

js div 等高 表格等高效果代码

Author:佚名 Link:本站原创 Hits: Update:2008-5-17 17:11:58
天极网摘 ViVi收藏夹 365Key 和讯网摘 POCO网摘
js div 等高 表格等高效果代码如下,其实表格和DIV等高代码操作差不多,自己看着改吧!
 
<TABLE cellSpacing=0 cellPadding=0 width=985 align=center border=0>
  <TBODY>
  <TR>
    <TD vAlign=top width=216>
      <TABLE class=dzq_banner id=dzq_2 cellSpacing=0 cellPadding=0 width="100%"
      border=0>
        <TBODY>
        <TR>
          <TD class=dzq_banner_title background=images/dzq_top.jpg
          height=37>企业介绍</TD>
        </TR>
        <TR>
          <TD id=dzq_iii vAlign=top align=middle
          background=images/dzq_bg.jpg><UL>
              <LI class=dzq_banner_out
              onmouseover="this.className='dzq_banner_over'"
              onmouseout="this.className='dzq_banner_out'"><A
              href="about.asp">企业简介</A>
              <LI class=dzq_banner_out
              onmouseover="this.className='dzq_banner_over'"
              onmouseout="this.className='dzq_banner_out'"><A
              href="about_honor.asp">企业荣誉</A>
              <LI class=dzq_banner_out
              onmouseover="this.className='dzq_banner_over'"
              onmouseout="this.className='dzq_banner_out'"><A
              href="about_show.asp">公司一角</A>
                  </UL></TD>
        </TR>
        <TR>
          <TD id=dzq_i background=images/dzq_bg.jpg></TD></TR>
        <TR>
          <TD
          style="BACKGROUND: url(images/dzq_bottom2.jpg) no-repeat; HEIGHT: 458px">&nbsp;</TD></TR></TBODY></TABLE></TD>
    <TD width=7></TD>
    <TD vAlign=top width=762>
      <TABLE id=dzq_ii cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD class=title_table
          style="BACKGROUND: url(images/center_top.jpg) no-repeat; HEIGHT: 50px">&#8226;
            伟利首页 &gt;&gt; 企业简介</TD>
        </TR>
        <TR>
          <TD class=content id=dzq_1 style="OVERFLOW: auto; HEIGHT: 120px;line-height:160%;" vAlign=top background=images/center_bg.jpg>
    <%=copyright%>
    </TD>
        </TR>
        <TR>
          <TD style="BACKGROUND: url(images/center_bottom.jpg) no-repeat"
          height=4></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE height=6 cellSpacing=0 cellPadding=0 width=985 align=center border=0>
  <TBODY>
  <TR>
    <TD></TD></TR></TBODY></TABLE>
<script type="text/javascript" language="javascript">
 if (document.all.dzq_i.offsetHeight<document.all.dzq_ii.offsetHeight){
  document.getElementById('dzq_i').style.height=document.all.dzq_ii.offsetHeight-495-document.all.dzq_iii.offsetHeight;
 }
 else{
  document.getElementById('dzq_1').style.height=document.all.dzq_2.offsetHeight-54;
 }
 //alert(document.all.dzq_i.offsetHeight);
 //alert(document.all.dzq_ii.offsetHeight);
</script>
   
  • 上一篇文章:
  • 下一篇文章:
  • [回到标题] [回到顶部]