Split url with javascript
<p>I'm trying to split following url:</p>

<p><a href="http://www.store.com/products.aspx/Books/The-happy-donkey" rel="nofollow">http://www.store.com/products.aspx/Books/The-happy-donkey</a></p>

<p>in order to get only <a href="http://www.store.com/products.aspx" rel="nofollow">http://www.store.com/products.aspx</a></p>

<p>I'm using javascript window.location.href and split but not success so far.
How can this be done? thanks</p>
