I have spent countless hours searching through tutorials in an attempt to make the anchor tag disappear and reappear for my Login form, but none have seemed to work for me. Even after copying and pasting various solutions, nothing has worked. Below is the code I am currently working with:
<form>
<input type="submit" name="btnadd" value="Login" onsubmit="hide()">
<a style="color: red;" id="notfound">User not found!</a>
</form>
</div>
<script>
var hide = function() {
var x = document.getElementById("notfound");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
</script>
I would greatly appreciate any assistance in getting this functionality to work correctly.