簡體   English   中英

使用javascript:window.print打印另一個HTML頁面

[英]Print another HTML page using javascript:window.print

這是我第一次在HTML5中使用以下Javascript編碼,但是我的打印頁面始終為空白,並顯示“ about:blank”。 有人可以幫我嗎? 我編寫的按鈕如下:

<a href="javascript:window.print()" class="icon-button print" target="LINK TO ANOTHER PAGE"><i class="icon-printer"></i><span></span></a>

the print function prints the content of the actual page, 
to print the other page you have to to execute the print on the load of that page like this :
<body onload="window.print()">

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM