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

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 developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.