faint,
同一个问题,你怎么发这么多帖子呀?
以前谈过类似的问题。
看看下面的链接,
我在8楼有代码。http://topic.csdn.net/u/20081026/22/f5bd6b37-da7f-49e6-8146-5667147e1cba.htmlhttp://topic.csdn.net/u/20081026/22/f5bd6b37-da7f-49e6-8146-5667147e1cba.html

解决方案 »

  1.   

    <iframe id="baiduIF" src="http://www.baidu.com" style="width:300px;height:400px;"> </iframe> 
    <script> 
    function getPos(o){ 
      var p=new Object(); 
      p.x=o.offsetLeft; 
      p.y=o.offsetTop; 
      while(o=o.offsetParent){ 
        p.x+=o.offsetLeft; 
        p.y+=o.offsetTop; 
      } 
      return p; 

    function $(id){return document.getElementById(id);} 
    window.onload=function(){ 
      var bd=$('baiduIF'); 
      var h=bd.offsetHeight,w=bd.offsetWidth; 
      var p=getPos(bd); 
      var =document.createElement("div"); 
      .style.zIndex=100; 
      .style.position="absolute"; 
      .style.left=p.x+"px"; 
      .style.top=p.y+"px"; 
      .style.width=w-20+"px"; 
      .style.height=h-20+"px"; 
      //======== 
      .style.filter="alpha(opacity=0)"; 
      .style.opacity="0"; 
      .style.backgroundColor="#ffffff";//ie不知道什么问题,没设置背景色不起作用,只好设置 
      document.body.appendChild() 

    </script>