I have same ancors/hyperlink in my html file. These point to a new website outside my site.
So I want that when the user clicks the link it should open a new tab or window. My website page should not be closed.
How can it be done? Don’t do it. You should not impose your opinion about where the new URL should be opened upon your visitors. If I want a URL to open in a new tab I’ll use Ctrl-click, or 3rd mouse button, or whatever. Point is: I decide, not you.
以上就是How can I open a new tab or window when a link is clicked?的详细内容,更多请关注web前端其它相关文章!