Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/415.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何让浏览器知道页面已完成;“装载”;使用window.open并将HTML直接写入新页面时?_Javascript - Fatal编程技术网

Javascript 如何让浏览器知道页面已完成;“装载”;使用window.open并将HTML直接写入新页面时?

Javascript 如何让浏览器知道页面已完成;“装载”;使用window.open并将HTML直接写入新页面时?,javascript,Javascript,示例代码(警告-加载时打开一个新窗口) 示例代码: var exampleWin = window.open("about:blank", "example"); var docMarkup = "<!doctype html><html><head><title>test</title></head>" + "<body><p>Why is the browser still transferri

示例代码(警告-加载时打开一个新窗口)

示例代码:

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);
var exampleWin=window.open(“关于:空白”,“示例”);
var docMarkup=“测试”+
“为什么浏览器仍在传输数据?我如何告诉它停止?

”; 例如win.document.write(docMarkup);
它工作正常,只是新打开的窗口中的浏览器加载微调器一直在运行。如果在新打开的页面上按stop和refresh,微调器将停止

我如何告诉页面没有更多的数据,并使微调器停止

编辑:在Firefox中调用:


…这将关闭
文档的输出流。写入
以使浏览器知道它已完成。

我在chrome中没有看到任何微调器
exampleWin.document.close();