我想在一个新的标签页中打开链接。链接的HTML标签是:
<a id="target_link" target="_blank" href="http://yahoo.com">
但是它并没有按照我的期望工作。我想在一段时间后在新标签页中打开。下面是 jQuery 代码片段,它完美地工作,但不会在新标签页中打开。
setTimeout(function()
{
window.location = $('target_link').get('href');
},1800);