What should I do to get uname and pword the value from the username and password input box? i tried to use document.getelementbyid().value but it doesn't seem to work
<!DOCTYPE html>
<html>
<head>
<p id="paragraph">
LOGIN
</p>
</head>
<form id="forme" autocomplete="off">
Username:<input type="text" id="take" name="Username"> <br><br> Password:
<input type="password" id="pass" name="Password"><br>
<input type="submit" onsubmit="javascript:checkid()">
</form>
<script>
function checkid() {
uname = document.getElementById("take").value
pword = document.getElementById("pass").value
if (uname == "abc" && pword == "123") {
document.getElementById("paragraph").innerText = "right"
} else {
document.getElementById("paragraph").innerText = "wrong"
}
}
</script>
</html>
javascript:in the statementonsubmit="javascript:checkid()"and the onsubmit belongs on the form tag