简体   繁体   中英

How to open the current page in chrome in a different browser window without reloading it?

I want to open the current page that i'm working in a different browser window. I know window.open() works but it loads the page by the given url. I want to display the current page that i'm working in a different browser window on a button click(preferably). Any help regarding this is appreciated

Use the JavaScript window.location.href property to get the entire URL of the current page which includes host name, query string, fragment identifier, etc.

So using: window.open(window.location.href) should work

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM