當您使用Firefox或Chrome將複製的HTML粘貼到框中時,以下頁面將創建一個下載鏈接。
<html>
<b>Select All, Copy, and paste below to download the full copied HTML</b>
<div id=drop contentEditable
style="padding: 1em; height: 30em; background:#bbb;overflow:hidden; ">
</div>
<a id=out download=copied.html style=display:none> Download </a>
<script>
var out=document.getElementById("out"),
drop=document.getElementById("drop");
drop.onpaste=function doPaste(){
setTimeout(function(){
out.href="data:x-application/html,"+
escape(drop.innerHTML);
drop.style.display="none";
out.style.display="block";
}, 50);
};
</script>
</html>
與您的網站使用,
- 做的東西,使網頁的變化,然後單擊頁面背景的空白區域和 按[Ctrl] + [A](WIN)或[ CMD] + [A](MAC)
- 拷貝使用右擊或鍵盤
- 粘貼到上述
- 點擊「下載」所示下載最終的HTML文件的文件中的框。
因爲它是一個小文件,我繼續向a copy online投擲,所以你可以嘗試一下;對於這個頁面非常有效。
注意風格的信息被轉換成風格attribs,所以你並不需要的CSS文件,但在同一時間,你沒有應用的樣式,其中一些設計師可能想要的文件名...