2011-03-12 61 views

回答

8

iframe是攜帶表單發佈的傳輸通道,所以Atanas是正確的,您必須停止iframe內的傳輸。

這裏是做根據瀏覽器的方式:

if (iframeObj.contentWindow.document.execCommand) 
    { // IE browsers 
     iframeObj.contentWindow.document.execCommand('Stop'); 
    } 
else 
    { // other browsers 
     iframeObj.contentWindow.stop(); 
    } 
// notify user upload was cancelled, remove spinner images, etc 
2

試試這個:

iframe.contentWindow.stop(); //for anything but IE 
iframe.contentWindow.document.execCommand("Stop"); // for IE 
0

我不知道,但我想刪除從DOM的iframe應該是夠了嗎?

1

當前設置iframe src爲「javascript:false」適用於我。

相關問題