地址欄是about:blank,頁面有內容,不能保存和查看源文件

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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章