div中显示页面

时间:2022-12-28 21:59:56

在css中显示页面,在页面布局中很多时候都要在一个div 里显示某些页面。在这里写下我用到的一种方式。

<script type="text/javascript">
   function theforever(a){
     document.getElementById("rigth-content").innerHTML='<iframe src="'+a.href+'"  width=100%  height=100%   frameborder="1"  marginheight="0"       marginwidth="0" style="border:0px none transparent"></iframe>';
     a.href="#";
    }
</script>

<div id="rigth-content" ></div>