This article is a mirror article of machine translation, please click here to jump to the original article.

View: 22002|Reply: 2

[JavaScript] jsOpens in a new window

[Copy link]
Posted on 12/7/2018 11:14:12 PM | | | |
Window.open() method

Full code

window.open('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, locatio{filter}n=no, status=no')

1. Close the current page and open a new page

(1) Method 1: Use hyperlinks

Hyperlink<a href="http://www.cnblogs.com/liumengdie/" title="My blog" >Welcome</a>

(2) Method 2: Use js to jump to the page - (open the window in the same current window)

window.locatio{filter}n.href="http://www.cnblogs.com/liumengdie/" ;   



2. Keep the current page and open a new tab page

(1) Method 1: Use hyperlinks

Hyperlink<a href="http://www.cnblogs.com/liumengdie/" title="My blog" target="_blank">Welcome</a>

(2) Method 2: Use js to open a new page (open a window in a new window)

window.open("http://www.cnblogs.com/liumengdie/",“_blank”);                 

3. Keep the current page and open a non-tab page

window.open(url, "_blank", "scrollbars=yes,resizable=1,modal=false,alwaysRaised=yes");





Previous:Modify to your own gateway, and the internal and external networks are on at the same time provided that there are two network cards
Next:Share EDIUS benefits, materials, tutorials, plugins
Posted on 3/22/2019 4:09:16 PM |
Prompt:Authors are banned or removed content is automatically blocked
 Landlord| Posted on 3/11/2021 10:56:52 AM |
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com