0
Its not working lol
I tried it in my own script.Its not working .-. <a href="https://www.google.com">Some link</a> <script> window.onload = function () { var tag = document.getElementsByTagName("a"); tag[0].href = 'http://www.sololearn.com'; }; </script>
2 ответов
+ 4
Please post the code in Code Playground and link it to your question. It will be easier to study your code in Code playground rather than in the question itself.
+ 1
huuuuh is that supposed to work?🤔🤔
well from what I know it should be
tag[0].setAttribute("href","link");