除了ajax js 不能实现么??????
如果有js 直接实现的就好了

解决方案 »

  1.   

    在页面上多写几个div,用到哪个的时候,就显示出来,没用到的就隐藏
      

  2.   

    可以用iframe获取源代码,也可以直接用iframe嵌入,更省事
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <script type="text/javascript">
    function $(id){
    return document.getElementById(id);
    }
    window.onload = function(){
    var frame1 = $("frame1");
    var table = $("table");
    frame1.src = "test.html";

    //延迟半秒
    setTimeout(function(){table.innerHTML = frame1.contentWindow.document.documentElement.innerHTML;}, 500);
    };
    </script>
    </head><body>
    <div id="table"></div>
    <iframe id="frame1" width="0" height="0" frameborder="0"></iframe>
    </body>
    </html>
      

  3.   

    写在iframe里然后copy iframe的innerHTML
      

  4.   

    6楼的 frame1.contentWindow.document.documentElement.innerHTML  
    这句的得到的内容不对啊
      

  5.   

    alert(frame1.contentWindow.document.body.innerHTML);frame1.contentWindow.document.documentElement.innerHTML  得到的都是 包含iframe 的这个外层页面的 所有内容。并不是 iframe 里面的内容。
    怎么回事呢?
      

  6.   

    最后还是用ajax  做了 
    因为 我是 table.innerHTML , table的innerHTML   在ie 有问题,
      

  7.   

    楼主看你要写什么了  innerHtml是逼不得已用的比如动态的生成一些什么代码
    建议你写点iframes 但是用iframes对页面的美观等等不是很好 再配合点div 用显示和隐藏 配合下吧