var a = document.getElementById('myElementID'); a.href = "http://www.mywebsite.com";
link.href = link.href + '?param1=' + input.value;