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)
BEM from QQtabBar First of all, what does BEM mea...
As shown below: name describe character varying(n...
1. Add skip-grant-tables to the my.ini file and r...
Record the BUG that got me stuck all afternoon to...
1. Introduction: Because my friend wanted to lear...
This article shares the specific code for writing...
Table of contents Preface Bubble Sort Basic Algor...
Flash file formats: .FLV and .SWF There are two ex...
When a thread executes a DELAYED statement for a ...
View the engines supported by the current databas...
Table of contents Question: answer: Reality: Know...
Table of contents 1. fill() syntax 2. Use of fill...
Table of contents Implementation ideas: Step 1: C...
Method 1: Use the SET PASSWORD command MySQL -u r...
Table of contents 1. What is a design pattern? 2....