我正在将此代码用于我的链接打开空白页面:
$("a[href^='http:']:not([href*='" + window.location.host + "'][target='_blank'])").live('click', function(){
$(this).attr('target','_blank');
});
此代码有效,但我只希望 pdf 文件打开空白页。我怎样才能做到这一点?
我正在将此代码用于我的链接打开空白页面:
$("a[href^='http:']:not([href*='" + window.location.host + "'][target='_blank'])").live('click', function(){
$(this).attr('target','_blank');
});
此代码有效,但我只希望 pdf 文件打开空白页。我怎样才能做到这一点?