![](/img/trans.png)
[英]How can I close a browser/page using jQuery if the page was not opned using window.open()?
[英]How can I make the browser know that the page has finished “loading” when using window.open and writing HTML directly to the new page?
Codepen的示例代碼(警告 - 在加載時打開一個新窗口)。
示例代碼:
var exampleWin = window.open("about:blank", "example");
var docMarkup = "<!doctype html><html><head><title>test</title></head>" +
"<body><p>Why is the browser still transferring data? How can I tell it to stop?</p></body></html>";
exampleWin.document.write(docMarkup);
它工作正常,除了新打開的窗口讓瀏覽器加載微調器永遠運行。 如果我在新打開的頁面上按停止並刷新,則微調器停止。
如何告訴頁面沒有更多數據進入並使微調器停止?
編輯:在Firefox中
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.