代码稍作调整就可以了:1.修改一下function goUrl():改成:function goUrl(){ var jumpUrl=imgLink[adNum]; var jumpTarget="_blank"; if (jumpUrl != ''){ if (jumpTarget != '') window.open(jumpUrl,jumpTarget); else location.href=jumpUrl; }}2.改一下