質問

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

役に立ちましたか?

解決 2

Try like

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

他のヒント

try this one :

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

Use the following code i hope it solves your issue

Java Script

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

In html button

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')
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top