So I am doing this task where I am supposed to class replace the anchor's target address (href attribute) and the text inside the tag with the homepage address of the contact. my html code
clonedNode.querySelector('a[href="#"]').setAttribute('href', inputHomepage.value)
clonedNode.querySelector(".homepage").innerHTML = inputHomepage.value
})
So, basically I will enter my Name, email address and contact in the form. When I hit the save button, It will show me my name,email and contact address. It views name and email fine but it doesn't view the contact address properly. e.g if you type google.com, it will just show it in plain text but it won't redirect it to gmail.com.
also if I comment out the line clonedNode.querySelector(".homepage").innerHTML = inputHomepage.value , it will redirect me to the desired webpage, but won't show me the contact address in text. Is there any fix?