如何在特定的浏览器选项卡/窗口/页面中打开链接/ URL?

问题描述:

我的页面包含链接/网址列表,其中target =_ blank。当我点击任何链接时,它会在新的标签/窗口/页面中打开(让我们说在窗口 W ),它确定,但是我想要的是什么?,当我点击任何其他链接时/ url(从列表中),然后该链接应该在窗口/页面 W 中打开,该链接已在前一次点击时打开/显示(即不会打开额外的选项卡/窗口)。

I have page with list of links/urls with target="_blank". And when I click on any link, it is open in new tab/window/page(lets say in window W), its ok, but waht I want is?, when I click on any other link/url(from list), then that link should be open in window/page W which is already opened/displayed on previous click(i.e. no extra tab/window will open).

前。
我的网站上有显示用户名称的页面&列表中的配置文件链接(target =_ blank),让我们说user1,user2,user3 ...,现在当我点击user1的配置文件链接时,新的窗口/页面将打开详细显示user1的配置文件,现在我点击配置文件user2的链接然后user2的配置文件应该在打开/显示user1的配置文件的窗口/页面中打开,而不是打开新的窗口/页面。

Ex. My site have page showing users name & profile link(target="_blank") in list, Lets say user1, user2, user3... , now when I click on profile link of user1 then new window/page will open shows user1's profile in details and now I click on profile link of user2 then user2's profile should be open in window/page in which user1's profile opened/displayed, instead of opening new window/page.

有可能吗?如果是,那么如何?

Is it possible? if yes then how?

是否可以使用php或jquery?

Is it possible using php or jquery?

听起来你只想命名你的目标.... target =someNameHere然后在你的第二个链接中使用相同的名字。

It sounds like you just want to name your target....target="someNameHere" and then use that same name in your second link.

<a href="blah.html" target="myTarget">Link 1</a>
<a href="blah2.html" target="myTarget">Link 2</a>