I want to add parameters to anchor tag via JavaScript. I do not want to use jQuery for this purpose. Here is my html anchor tag
<div class="u-right u-half"><a href="http://example.com/register/" class="u-button u-alt">Register</a></div>
I am able to do this with jquery but I want to do this with JavaScript. Here is my jquery but I want to use JavaScript instead
jQuery('.u-right .u-button').attr("href", function(i, href) {
return href + '?page=search';
});
How I can do this with JavaScript ?