1. Background of the problem:
2. Causes of the problem:The document may have been manipulated but not destroyed (maybe) 3. Problem solving:Eliminate the document of the operation
//The method parameter content: the element to be printed printFun = (content) => { var Window = window.open("", "Print Page", "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no"); var style = "<style type='text/css'></style>"; Window.document.write(content + style); Window.focus(); Window.document.close(); //Close the output stream of the document and display the selected data Window.print(); //Print the current window return Window; }
var windows = this.print(document.getElementById('billDetails').innerHTML); windows.close(); Summarize:
This is the end of this article about how to solve the problem of page unresponsiveness when using window.print() in React. For more related content about page unresponsiveness when using window.print() in React, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! |
<<: CSS Tutorial: CSS Attribute Media Type
>>: Nginx implements high availability cluster construction (Keepalived+Haproxy+Nginx)
A simple MySQL full backup script that backs up t...
Pull the image # docker pull codercom/code-server...
Ubuntu 16.04 installs the PHP7.0 environment by d...
This article example shares the specific code of ...
background On mobile devices, caching between pag...
In some cases, the data in data needs to be reuse...
The three-dimensional column chart consists of th...
The shell script sets access control, and the IP ...
Notice! ! ! This situation can actually be avoide...
Table of contents Table/index.js Table/model/inde...
I am going to review Java these two days, so I wr...
Are you still using rem flexible layout? Does it ...
This article example shares the specific code of ...
The installation tutorial of mysql 8.0.11 winx64 ...
Learn a jQuery plugin every day - floating menu, ...