<iframe name="fraName" id="fraID" src="www.163.com"></iframe>
<input type="button" value="显示代码" onclick="document.write(document.fraName.document.body.innerHTML)">
<input type="button" value="拷贝至粘贴板" onclick="window.clipboardData.setData("Text",document.fraName.document.body.innerHTML);">取所有内容用这个 document.fraName.document.getElemenetsByTagName("html")[0].outerHTML