35 lines
No EOL
1.6 KiB
HTML
35 lines
No EOL
1.6 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
|
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
<title>Sign up</title>
|
|
</head>
|
|
<body>
|
|
<h1>Sign up page</h1>
|
|
<form id="signup">
|
|
User Name: <input type="text" id="userName" minlength="4" size="10" required="required"><br>
|
|
Password: <input type="password" id="password" minlength="4" size="10" required="required"><br>
|
|
Confirm Password: <input type="password" id="confirmPassword"><br>
|
|
<input type="submit" value="Submit" formaction="index.html">
|
|
<a class="nav-link" href="index.html">Return to main menu</a>
|
|
</form>
|
|
</body>
|
|
<script type = "text/JavaScript">
|
|
var password = document.getElementById("password");
|
|
var confirm_password = document.getElementById("confirmPassword");
|
|
function validatePassword(){
|
|
if(password.value != confirm_password.value) {
|
|
confirm_password.setCustomValidity("Passwords Don't Match");
|
|
}
|
|
else {
|
|
confirm_password.setCustomValidity('');
|
|
}
|
|
}
|
|
password.onchange = validatePassword;
|
|
confirm_password.onkeyup = validatePassword;
|
|
</script>
|
|
</html> |