2012-04-12 219 views

回答

5

指定自定義target名稱:

<a href="something.html" target="otherpage">Go to some page #1</a> 
<a href="something2.html" target="otherpage">Go to some page #2</a> 

這將「名」的其他窗口/標籤,並在該頁面相同target打開鏈接,或在新窗口/標籤如果一個不已經存在。您可以通過將名稱指定爲第二個參數來達到與window.open相同的效果。

+0

這就行了。謝謝。 – 2012-04-13 13:58:50

+0

這不適用於鉻 – btm1 2014-03-04 19:35:39

+0

@ btm1:請您提供一個示例頁面,我可以重現該頁面嗎? – Ryan 2014-03-04 19:37:05