2012-04-17 167 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

回答