看到一个页面,打开子页面后地址栏是about:blank,当然不能保存和查看源文件,百度后发现是用了window.open('javascript:;')做出的效果,记录一下。
<!DOCTYPE html>
<html>
<header>
<title>test1</title>
</header>
<body>
<span>he</span>
</body>
</html>
<script>
window.open('javascript:document.write("内容"); document.title="标题";document.close');
</script>