+ 1
If you have a tag that takes you to Google and you want to change it to Gmail then you can do following(applies in any case) <a href="www.google.com">Google</a> var link = document.getElementsByTagName('a')[0]; link.href = "gmail.com"; link.innerText = 'gmail';
14th Oct 2020, 8:32 PM
Raj Chhatrala
Raj Chhatrala - avatar