2007-10-29

疑惑:一个页面Iframe过多

关键字: dhtml

如果一个页面的iframe太多,会造成什么样的后果呢

如下面的页面index.html

      
  1. <html xmlns="http://www.w3.org/1999/xhtml">  
  2. <head>  
  3. <title>testtitle>  
  4. <style type="text/css">  
  5. body {   
  6. margin: 0px;   
  7. }   
  8. -->  
  9. style>  
  10. head>  
  11. <body>  
  12. <center>  
  13. <iframe src="/include/topMenu_sz.jsp" width="1000" height="130" scrolling="no" frameborder="0" noresize="noresize" id="topFrame"></iframe>         
  14.   
  15. <iframe src="/include/midder.jsp" width="1000" height="460" scrolling="no" frameborder="0" noresize="noresize" id="midder"></iframe>              
  16.                  
  17. <iframe src="/include/bottom.jsp" scrolling="no" frameborder="0" width="1000" height="20" noresize="noresize" id="bottom"></iframe>    
  18. </center>  
  19. </body>  
  20. </html>  

而其中的第二个iframe,即 midder.jsp包含另外两个iframe.

  1. <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">  
  2.   <tr>  
  3.    <td width="375"  valign="top" id="leftTD"><iframe id="left" width="385" height="458" src="/left.jsp" frameborder="0" scrolling="no" id="left" noresize></iframe></td>  
  4.    <td width="620" valign="top" id="mapAreaTD"><iframe width="620"  height="458" id="mapArea" src="/area.jsp"  frameborder="0" scrolling="no" noresize></iframe></td>  
  5.  </tr>  
  6. </table>  

而left.jsp又包含另外一个iframe,content.jsp

每次加载这个页面的时候都不是从上面开始加载的,从midder.jsp这个页面加载的

这样做虽然麻烦,但便于维护和修改

请大家分析一下怎么重构好点,是div+css还是页面内容动态生成,

 

评论
发表评论

您还没有登录,请登录后发表评论

xyh
搜索本博客
博客分类
我的相册
D6559ae8-1ca0-3934-bfe8-0ec70062a94e-thumb
新建 BMP 图像
共 10 张
存档