I need a link in my project sothat if anybody click on that link ,he remain on same page and the link opened in new tab.for example i have a link <a href="http://www.google.com">google</a> on page mypage.php .when anybody click on google than he will remain on mypage.php and a new tab should be opened in new tab.is it possible?

Recommended Answers

add target="_blank" to the a tag

Jump to Post

You may be able to do an open-behind type behaviour with javascript but I don't think there is a way to do it in the anchor tag itself.

Jump to Post

All 5 Replies

add target="_blank" to the a tag

in this target attribute user reached to its link.i need to be on same page and the link should be opened in another tag and user can not see the link wihout clicking on the opened tab.

You may be able to do an open-behind type behaviour with javascript but I don't think there is a way to do it in the anchor tag itself.

how can we do this using javascript?

is it have no solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.