[英]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.