2012-04-17 166 views
0

我在网页上有该元素:如何用javascript/jquery关闭iframe?

<iframe src="http://example.com" id="fa-iframe" scrolling="No" frameborder="0" style="height: 513px; width: 597px; "></iframe> 

现在,我在其中运行jQuery和尝试关闭它...

jQuery的应该在元素上执行某些功能...

我试图解决方案,如this..but它没有工作:

document.getElementById('fa-iframe').style.display="none"; 

如何关闭iframe..while文档与JavaScript是里面的IFRAME?

+0

阅读此 - http://stackoverflow.com/questions/726816/how-to-write-this-in-jquery-window-parent-document-getelementbyidparentprice – 2012-04-17 13:46:46

回答