2013-07-09 97 views

回答

2

您必须为此使用JavaScript。

HTML代码

<a href="#" id="linkId">Click Here</a> 

JavaScript代码

$('#linkId').click(function(e) { 
    e.preventDefault(); 
    window.open('http://google.com'); 
    window.open('http://facebook.com'); 
}); 
0

HTML:

<a href="#" class="yourlink">Click Here</a> 

JS:

$('a.yourlink').click(function(e) { 
    e.preventDefault(); 
    window.open('http://yoururl1.com'); 
    window.open('http://yoururl2.com'); 
}); 

window.open也可以接受其他参数。请在此处查看:http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

您还应该知道window.open有时会被弹出窗口拦截器和/或广告过滤器阻止。

相关问题