target=“_blank” is not working in firefox?

2020-02-14 02:04发布

target="_blank" is not working with firefox <a href="login.php" target="_blank" onclick="javascript:window.close();" > <img src="images/loginto-apply-but.gif" border="0"/> </a>

2条回答
不美不萌又怎样
2楼-- · 2020-02-14 02:18

Use below instead.

<a href="#" onclick="window.open('login.php','_blank');window.close();return false">
  <img src="images/loginto-apply-but.gif" border="0"/>
</a>
查看更多
可以哭但决不认输i
3楼-- · 2020-02-14 02:19

This is not working because you're calling a Javascript event to close the current window and after launching the "_blank" to acces to your link. You have to create a Js method to launch your link and after close the current window.

查看更多
登录 后发表回答