The example in this article describes the method of dynamically modifying the pop-up window size using JavaScript. Share it with everyone for your reference. The details are as follows:
The following JS code demonstrates how to pop up a new window through window.open and then dynamically modify the window size
<!DOCTYPE html> <html> <head> <script> var w; function openwindow() { w=window.open('','', 'width=100,height=100'); w.focus(); } function myFunction() { w.resizeTo(500,500); w.focus(); } </script> </head> <body> <button onclick="openwindow()">Create window</button> <button onclick="myFunction()">Resize window</button> </body> </html>
I hope this article will be helpful to everyone’s JavaScript programming design.