In the code below, I am hard coding the url.
<a class="button_link" href="https://somewebsite.com/submit/?url=http%3A%2F%2Fsomecrazyurl.com" target="_blank" aria-label="Sharei">
Instead I want something like this:
<a class="button_link" href="https://somewebsite.com/submit/?url=returnpageurl()" target="_blank" aria-label="Sharei">
Edit: For the record I used
$(location).attr('href');
However nothing gets returned.
Is there any cross-browser Javascript to return the current url of the page?