[格式]:location.replace("view-source:"+location)
[說明]打開記事本,在記事本中顯示該網頁的源代碼。
[舉例]在body之間加入:
<a href="#" onclick=location.replace("view-source:"+location)>使用 記事本 編輯</a>
3、〖另存為〗命令的實現
[格式]:document.execCommand("saveAs")
[說明]將該網頁保存到本地盤的其它目錄!
[舉例]在body之間加入:
<a href="#" onclick=document.execCommand("saveAs")>另存為</a>
文章來源于領測軟件測試網 http://www.kjueaiud.com/