Home > Net >  Update an opened tab when clicking different links
Update an opened tab when clicking different links

Time:03-06

Using _blank in html I was able to open a new tab (page “B”) from a specific link in Page “A”, my ask is how can I make this opened new tab to be updated when clicking on another links in page “A” rather than opening new tabs ?

CodePudding user response:

Instead of using a _blank target, use a named target.

<a href="//google.com" target="myTarget">Google</a>
<a href="//mozilla.org" target="myTarget">Mozilla</a>

I would put this in a stack snippet, but it seems to block opening links in new tabs...So here's a fiddle, I guess.

  • Related