https://gyazo.com/77426cde9a65c89424d303b4a8ef123d
Hi! I'm completely new to HTML and Javascript and i need help to "connect" a text and a button.
If i click the button i want the text to hide (text) Visibility;hidden but i don't know how to do and i have searched everywere so you guys are my last hope.
Here are the codes:
Button: <button "type=button" "onclick = document.getElementById("Wrong").style.visibility = "hidden";" >Hej</button>
Text: <div id="Wrong"></div><font color="red">Wrong Username Or Password!</font>
You almost got it right. Since you have double quotes on the outside you need to either escape the double quotes on the inside or use single quotes instead.
Hej hej!
And for the text part, put the closing div at the end, after the obsolete font tag.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)