JQuery - open a new window on page load

How to open a new browser window when loading a w / jQuery page?

Thank!

+3
source share
1 answer

You can do this in the jQuery event document.ready(shortcut'ed below) by calling the methodwindow.open()

$(function(){ 
    window.open(url, windowName[, windowFeatures]); 
});

windowFeatures:

  • Status Status bar at the bottom of the window.
  • toolbar . A standard browser toolbar with buttons such as Back and Forward.
  • Location The input field for the location where you enter the URL.
  • menu Window menu bar
  • Directories Standard browser directory buttons such as Whats New and Whats Cool
  • resizable / .
  • . ,
  • . (: height = 350 ')
  • .

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

+4

Source: https://habr.com/ru/post/1786559/