在新窗口中打开链接,而不是在新选项卡中打开链接


Open link in new window , not in new tab

我正在尝试在新窗口中打开链接,尝试了一些代码,但他们在新选项卡中显示它。任何建议请...

<a href="https://www.google.co.in/" target="_blank" >Demo</a>    // this opens in  new tab
 <li onclick="window.open('https://www.google.co.in/')">Demo</li>  // this is also opening in new tab 

提前致谢

试试这个:

 <li onclick="window.open('http://publichealth.ecareagora.com','mywindow','height:auto;width:auto;')">Demo</li> 

尝试喜欢

<li onclick="window.open('http://www.google.com','mywindow','height:400;width:400;')">Demo</li> 

使用以下代码 我希望它能解决您的问题

爪哇脚本

function MM_openBrWindow(theURL,winName,features) 
 { 
  window.open(theURL,winName,features);
  return false;
 }

在 html 按钮

onclick="MM_openBrWindow('help1.php','','width=750, height=650,left =530,
 top =230, location=no, menubar=no, status=yes,toolbar=yes,
  scrollbars=yes, resizable=yes')