Open a new page on click of a link on new window

限于喜欢 提交于 2020-01-15 10:02:17

问题


I have a page in which i have provided a link clicking on which should redirect to a new page on the new window.

My code is

<a href="javascript:void(0);" class="webMnu" onclick="window.open('http://abc.com','plain');">Enroll</a>

The problem is that it is working fine in firefox(opens in a new tab) but in internet explorer its opening in a popup (not in a new tab).

How can i open this new page in new tab?

Please help me on this.

Thanks

Pankaj


回答1:


you want

<a href="http://abc.com" target="_blank">Enroll</a>

window.open is for popup windows, if you just want a new browser window/tab, target=_blank is your friend.



来源:https://stackoverflow.com/questions/2620765/open-a-new-page-on-click-of-a-link-on-new-window

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!