我有这个结构:
<ul>
<li><a href="mydomain/site/location/paris/">Paris</a></li>
<ul>
<li><a href="mydomain/site/location/london/">London</a></li>
</ul>
<li><a href="mydomain/site/location/amsterdam-and-paris/">Amsterdam and Paris</a></li>
</ul>
我需要用这个替换每个锚的href:
<a href="mydomain/site/event?location=london">London</a>
你能帮我吗