Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- <script>
- function callPrint() {
- document.getElementById("frm1").contentWindow.myPrint();
- // window.frames[0].frameElement.contentWindow.myPrint();
- }
- </script>
- </head>
- <body>
- <form runat="server">
- <input type="button" onclick="callPrint()" value="Print" />
- <iframe id="frm1" src="http://localhost:4398/HtmlPage1.html" width="1300px;"></iframe>
- </form>
- </body>
- </html>
- --------------------------------------------------------------
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <meta charset="utf-8" />
- <script>
- window.myPrint = function () {
- window.print();
- }
- </script>
- </head>
- <body>
- <table>
- <tr>
- <td>
- dsfgbsdgbdgbsdfg
- </td>
- </tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement