通过js让a标签都在新窗口打开
jquery:
// 这是body下的a标签
$(\'body\').on(\'click\', \'a\', function(e) {
e.target.target = \'_blank\';
$(function(){
$(\'body a\').each(function(){
$(this).attr(\'target\',\'_blank\');
});
});
$(function(){
var aLinkClickHandler=function(event){
if($(this).attr(\'isReady\')!==\'1\'){
event.preventDefault();
$(this).attr(\'target\',\'_blank\');
$(this).attr(\'isReady\',\'1\');
$(this)[0].click();
}
}
$(\'body a\').on(\'click\',aLinkClickHandler);
});