how to open in new window

后端 未结 3 1931
别跟我提以往
别跟我提以往 2020-12-19 14:45

i have another problem :( this is my script



        
3条回答
  •  孤城傲影
    2020-12-19 15:34

    Use the window.open method and specify _blank as the target:

    window.open('http://www.yahoo.com.sg', '_blank');
    

    This will open the page in a new window or a new tab, depending on the user settings in the browser.

    If you want it to open in a new popup window always, you can specify a parameter string with width and height for the window. However, most browsers will block such a popup that opens a page from a different domain.

提交回复
热议问题