JavaScript open in a new window, not tab

前端 未结 15 1303
余生分开走
余生分开走 2020-11-21 22:18

I have a select box that calls window.open(url) when an item is selected. Firefox will open the page in a new tab by default. However, I would like the page t

15条回答
  •  别那么骄傲
    2020-11-21 22:52

    try that method.....

    function popitup(url) {
           //alert(url);
           newwindow=window.open("http://www.zeeshanakhter.com","_blank","toolbar=yes,scrollbars=yes, resizable=yes, top=500, left=500, width=400, height=400");
           newwindow.moveTo(350,150);
       if (window.focus) 
              {
                 newwindow.focus()
              }
       return false;
      }
    

提交回复
热议问题