如何使用单个锚标记打开多个链接 [英] How can I open multiple links using a single anchor tag
本文介绍了如何使用单个锚标记打开多个链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以这是一个简单但有趣的问题,如何使用单个 <a>
元素打开多个链接?
So here's a simple but interesting question, how can I open multiple links using single <a>
element?
使用这个只会打开第一个 href
Using this only opens the first href
<a href="http://www.google.com" href="http://www.yahoo.com" target="_blank">Click Here</a>
推荐答案
你当然可以试试这个
<a href="http://www.microsoft.com" target="_blank" onclick="window.open('http://www.google.com'); window.open('http://www.yahoo.com');">Click Here</a>
这篇关于如何使用单个锚标记打开多个链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文