Search code examples
javascriptphphtmlhyperlinkhref

Open link in new window , not in new tab


I am trying to open a link in new window, tried out some codes but they are displaying it in new tab . Any suggestions please...

<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 

Thanks in Advance


Solution

  • Try like

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