js批量替换a标签href中指定字符,例如:把下面a标签中的href中www.aa.com,实时替换成www.bb.com,如何写js呢?
<div id="abc">
<a href="http://www.aa.com/a.html">测试</a>
<a href="http://www.aa.com/b.html">测试</a>
<a href="http://www.aa.com/c.html">测试</a>
<a href="http://www.aa.com/d.html">测试</a>
<a href="http://www.aa.com/e.html">测试</a>
</div>