看到一個頁面,打開子頁面後地址欄是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>