Assuming I have outerpage.html
<html>
<head>开发者_如何转开发
</head>
<body>
<input type="button" id="printPage" name="printPage" />
<input type="button" id="savePage" name="savePage" />
<iframe src="someOtherPage.html"></iframe>
</body>
</html>
How can I use Javascript to save and print someOtherPage.html when the respective buttons are clicked?
Use the window.print() method.
Also refer to the following link for similar question and answer.
How do I print an IFrame from javascript in Safari/Chrome
精彩评论