日期:2014-05-16 浏览次数:21117 次
<textarea id="html" style="width:100%;height:200px" > </textarea>
<button onclick="view()" >click</button>
<script>
function view(){
var win=open('');
win.document.open();
win.document.write( document.getElementById("html").value);
win.document.close();
}
</script>