+ 2
Can i use document.getElementById() in changing href link ?
<a id="max" href="https://sololearn.com">link</a>
5 Respostas
+ 3
var elem = document.getElementById("max");
elem.setAttribute('href', 'https://new-href');
+ 2
yes of course
+ 1
thanks
+ 1
thanks