我有页面 VIEW-SALE.PHP 在此页面上,我有一个提交按钮表单,用于查看打印格式的发票,其中包含代码:
<span style='display:inline-block'>
<form name='print' id='print' action='print-invoice.php'
target='_blank' method='post'>
<input type='hidden' name='invoice' value='$invoice'>
<input class='submit-all' type='submit'
value='Print the invoice'
onClick='window.print();return false'></form></span>
代码必须只打开页面 PRINT-INVOICE.PHP 并打印它,但是当我单击它时它显示打印对话框但当前页面我是 VIEW-SALE.PHP 所以它不显示 PRINT-INVOICE。 PHP
如何实现?
最佳答案
关于javascript - HTML 表单 POST 到直接打印页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35104160/