开发者

Save Page / Print Page buttons for the page that iframe src is linking to

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜