在div里隐藏不了iframe

 

<div >
   <iframe allowtransparency="true" src="web/rebootOper.php" scrolling="auto" width="100%" height="100%" frameborder="0"></iframe> 
</div>

即使div使用了display:none的style,页面rebootOper.php仍会被执行。

个人理解:涉及到跳转到另一个页面的内容。

在div里动态调用iframe的方式,在js 里新建一个iframe

<div >
  <!-- <iframe allowtransparency="true" src="web/rebootOper.php" scrolling="auto" width="100%" height="100%" frameborder="0"></iframe> -->
</div>


function showPop(){
     document.getElementById("main").style.position = 'absolute';
     var elementObject = document.getElementById("popupmenu");

    var strIframe  = '<iframe allowtransparency="true" src="web/rebootOper.php" scrolling="auto" width="100%" height="100%" frameborder="0"></iframe>';
      elementObject.innerHTML = strIframe;
    }

 

相关文章:

  • 2021-10-04
  • 2021-11-05
  • 2021-12-22
  • 2021-12-20
  • 2021-11-23
  • 2021-11-05
  • 2021-11-09
  • 2021-10-16
猜你喜欢
  • 2021-11-18
  • 2021-11-18
  • 2021-11-08
  • 2021-09-27
  • 2021-09-29
  • 2021-11-03
  • 2021-11-13
相关资源
相似解决方案