<script> addTarget(); function addTarget(){ var oa=document.getElementsByTagName('a'); for(var i=0;i<=oa.length;i++){ oa[i].setAttribute("target","_blank"); } } </script>
做项目的时候总是忘了加target,然后写了个小js,批量添加!