the a tag is not appearing
in the javascript code before i added
text.innerHTML = "Hello world and welcome";
the username.innerHTML = name
was working normally and now it does not. it just disappears unless i remove text.innerHTML = "Hello world and welcome";
3 Replies
well, this is your html
as soon as you set the innerhtml of text to
Hello world and welcome
the html becomes
So, the <a>
does not exist anymore, because you just changed the entire inner html
put the text inside a span and it's easier to manage
its works!
thank you :)