I want to change (or control...) my <a> href with JavaScript. Here is my HTML structure:
<a class="google" href="#">LINK ONE</a>
<a class="google" href="#">LINK TWO</a>
And here my JavaScript code:
document.querySelectorAll("a.google").href = "https://google.com"
If I use querySelector(".google") it change the link, but just one of theme. If I use querySelectorAll(".google") or ("a.google") it doesn't change anything.
Can anyone help me?
 
    