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");
|