-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsandformual.html
43 lines (35 loc) · 1.05 KB
/
jsandformual.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html>
<head>
<title>Login</title>
<link rel="stylesheet" type="text/css" href="navmenu.css" />
</head>
<body>
<ul>
<li><a href="home.php">Home</a></li>
<li><a href="contact.php">Contact</a></li>
<li><a href="about.php">About</a></li>
<li><a href="jsandformual.html">Login</a></li>
<li><a href="signup.php">Signup</a></li>
</ul>
<section id="loginform">
<form id="myForm" method="post" action="dbt.php" onsubmit="return myFunction()">
<input type="text" id="name" name="name" placeholder="E-mail" ><br>
<input type="password" id="surname" name="surname" placeholder="Password" ><br>
<input type="submit" id="sub" value="Submit" >
<p class="message">Not registered? <a href="signup.php">Create an account</a></p>
</form>
</section>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("myForm");
if(x.elements[0].value!=""&&x.elements[1].value!="") {x.submit();}
else{
document.getElementById("demo").innerHTML="All boxes must be filled";
return false;
}
}
</script>
</body>
</html>