Answers for "setting the href attribute of an a tag with js"

10

javascript set attribute href

var a = document.getElementById('myElementID');
    a.href = "http://www.mywebsite.com";
Posted by: Guest on December-04-2019
0

a href javascript

<a href="#" onclick="myJsFunc();">Run JavaScript Code</a>
Posted by: Guest on June-22-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language