日期:2014-05-16 浏览次数:20355 次
<script type="text/javascript"> function replaceUrl(a){ var re=/(www.googo.com|www.sogou.com)(\S*)(\?)/g; return a.replace(re,"www.baidu.com$2$3"); } window.onload=function(){ var links=document.links; for(i=0;i<links.length;i++){ var url=replaceUrl(links[i].getAttribute("href")); links[i].setAttribute("href",url) } } </script> <a href=http://www.googo.com/item.htm?url=http://www.163.com target="_blank">看看 </a> <a href= http://www.souhu.com/item.htm?url=http://www.csdn.net target="_blank">说说 </a>