Answers for "how to make javascript change the href of a html element"

4

change href for a tag using JS

document.getElementById("myAnchor").href = "http://www.cnn.com/";
Posted by: Guest on April-02-2021

Code answers related to "how to make javascript change the href of a html element"

Code answers related to "Javascript"

Browse Popular Code Answers by Language