Use window.open():

<a onclick="window.open(document.URL, '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');">
  Share Page
</a>

This will create a link titled Share Page which opens the current url in a new window with a height of 570 and width of 520.

Answer from citruspi on Stack Overflow
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ API โ€บ Window โ€บ open
Window: open() method - Web APIs | MDN
Open no more than one new window at once. Reuse existing windows to display different pages. Advise users on how to update their browser settings to allow multiple windows. ... Alternatively, the following example demonstrates how to open a popup, using the popup feature.
๐ŸŒ
W3Schools
w3schools.com โ€บ jsref โ€บ met_win_open.asp
Window open() Method
More examples below. The open() method opens a new browser window, or a new tab, depending on your browser settings and the parameter values.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript โ€บ javascript-window-open-method
JavaScript window.open() Method - GeeksforGeeks
August 5, 2025 - Example 1: In this example, we will open a new window on a button click with the specified parameters.
๐ŸŒ
JavaScript.info
javascript.info โ€บ tutorial โ€บ frames and windows
Popups and window methods
There is also a number of less supported browser-specific features, which are usually not used. Check window.open in MDN for examples.
๐ŸŒ
Reintech
reintech.io โ€บ blog โ€บ tutorial-working-with-the-window-open-method
Working with the window.open() Method | Reintech media
January 13, 2026 - A common use case for window.open() is implementing OAuth authentication flows. Here's a complete example that handles popup blockers and communicates between windows:
๐ŸŒ
Javatpoint
javatpoint.com โ€บ javascript-window-open-method
JavaScript Window open method - javatpoint
JavaScript Window open method with javascript tutorial, introduction, javascript oops, application of javascript, loop, variable, objects, map, typedarray etc.
Find elsewhere
๐ŸŒ
Electron
electronjs.org โ€บ opening windows from the renderer
Opening windows from the renderer | Electron
For example: window.open('https://github.com', '_blank', 'top=500,left=200,frame=false,nodeIntegration=no') Notes: Node integration will always be disabled in the opened window if it is disabled on the parent window. Context isolation will always be enabled in the opened window if it is enabled ...
๐ŸŒ
W3Schools
www-db.deis.unibo.it โ€บ courses โ€บ TW โ€บ DOCS โ€บ w3schools โ€บ jsref โ€บ met_win_open.asp.html
Window open() Method
More "Try it Yourself" examples below. ... Tip: Use the close() method to close the window. ... var myWindow = window.open("", "MsgWindow", "width=200,height=100"); myWindow.document.write("<p>This is 'MsgWindow'. I am 200px wide and 100px tall!</p>"); Try it Yourself ยป
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ javascript-window-open-window-close-method
Javascript Window Open() & Window Close() Method | GeeksforGeeks
August 1, 2024 - The Javascript Window.Open() method is used to open the web pages into a new window or a new tab.
๐ŸŒ
Educative
educative.io โ€บ answers โ€บ what-is-the-windowopen-method-in-javascript
What is the window.open() method in JavaScript?
All parameters of this method are optional. If none is specified, the method will open a new blank browser window. URL: The URL parameter specifies the URL that will be opened in the new window.
๐ŸŒ
Arai-a
arai-a.github.io โ€บ window-open-features
window.open with features
features parameter of window.open interacts with where the newly created browsing context is opened.
๐ŸŒ
W3cubDocs
docs.w3cub.com โ€บ dom โ€บ window โ€บ open
Window.open - Web APIs - W3cubDocs
April 26, 2022 - When window.open() returns, the window always contains about:blank. The actual fetching of the URL is deferred and starts after the current script block finishes executing. The window creation and the loading of the referenced resource are done asynchronously. ... Alternatively, the following example demonstrates how to open a popup, using the popup feature.
๐ŸŒ
Reality Ripple
udn.realityripple.com โ€บ docs โ€บ Web โ€บ API โ€บ Window โ€บ open
Window.open() - Web APIs
This outerHeight value includes any/all present toolbar, window horizontal scrollbar (if present) and top and bottom window resizing borders. Minimal required value is 100. In modern browsers (Firefox 76 or newer, Google Chrome, Safari, Chromium Edge), the following features are just a condition for whether to open popup or not. See popup condition section. The following features control the visibility of each UI parts, All features can be set to yes or 1, or just be present to be on. Set them to no or 0, or in most cases just omit them, to be off. Example: status=yes, status=1, and status have identical results.
๐ŸŒ
ZetCode
zetcode.com โ€บ dom โ€บ window-open
JavaScript window.open Guide: Learn How to Open Browser Windows
April 2, 2025 - The window.open returns a reference to the new window object. This reference allows manipulation of the new window. We use document.write to add content and close to programmatically close the window. Note that many browsers restrict cross-origin window control for security reasons. This example shows how to use the window name parameter for targeting.
๐ŸŒ
University of New Mexico
unm.edu โ€บ ~tbeach โ€บ IT145 โ€บ week13 โ€บ example10.html
Javascript Opening Windows
<p>Let's open a new window with this <a href="javascript:location='example10.html'; window.open('../index.html', 'demo1','height=400,width=500,top=50,left=50,scrollbars=yes,toolbar=yes,status=yes,menubar=yes,location=yes,resizable=yes')">link</a>.</p>
๐ŸŒ
EncodedNA
encodedna.com โ€บ 2013 โ€บ 09 โ€บ javascript-window-open-method.htm
Open a New Browser Window using JavaScript open() Method
Now, this behavior varies from browser to browser. Try this in different browsers, particularly with Internet Explorer and see the result. The default is 0 or no. var win = window.open('popupwindow.htm', 'New Window','width=300,height=300,top=70,left=500,resizable=no');