//pure javascript //with HTML: <a id="yourHref" href="https://myOldLink.com" >My Link</a> var yourElement = document.getElementById('yourHref'); yourElement.setAttribute('href', 'https://yourNewLink.com');
//pure javascript //with HTML: <a id="yourHref" href="https://myOldLink.com" >My Link</a> var yourElement = document.getElementById('yourHref'); yourElement.setAttribute('href', 'https://yourNewLink.com');