我有一个JSP页面,其中包含一个表单和一个表格。当我单击“打印”按钮时,应该只打印表格。请帮助我。
One of the way to achieve this to open another tab which will only contain that table you want to print. Then on document.load of that pop-up call the JavaScript function window.print()
This will open print window from there you can print the contents of pop-up.
您可以使用javascript的窗口事件,只需在按下按钮时调用此事件
window.print();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.