admin管理员组文章数量:1425176
I am quite new to HTML, I have senior where I have two anchor tags in one HTML page.
Example:Main.html
<a href ="/" target="_blank">Google</a><br>
<a href ="/" target="_blank">facebook</a>
My goal is to open Facebook or Google in a new tab when the user first clicks a link.
When the user clicks a link again, it shouldn't open a new tab, but instead it should update the Google or Facebook tab that has already been opened.
I am quite new to HTML, I have senior where I have two anchor tags in one HTML page.
Example:Main.html
<a href ="https://www.google.co.in/" target="_blank">Google</a><br>
<a href ="https://www.facebook./" target="_blank">facebook</a>
My goal is to open Facebook or Google in a new tab when the user first clicks a link.
When the user clicks a link again, it shouldn't open a new tab, but instead it should update the Google or Facebook tab that has already been opened.
Share Improve this question edited Mar 2, 2019 at 20:08 Sacha 89310 silver badges29 bronze badges asked Mar 2, 2019 at 19:07 Pritiranjan SwainPritiranjan Swain 911 silver badge7 bronze badges1 Answer
Reset to default 10Set your target
attribute.
<a href="https://www.facebook." target="facebookTargetTab" />Facebook</a>
Links with the same target
will open up in the same new tab. This behavior is a holdover from the days of framesets, where each frame was named. If the name didn't exist, a new window (and these days, a new tab) was opened.
本文标签: javascripthref target tab should open a tab in first and update on second timeStack Overflow
版权声明:本文标题:javascript - href target tab should open a tab in first and update on second time - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745373162a2655823.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论