-
Notifications
You must be signed in to change notification settings - Fork 0
/
lesson2.html
57 lines (55 loc) · 1.56 KB
/
lesson2.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<html>
<head>
<link rel="stylesheet"
type="text/css"
href="style.css"
/>
<script type="text/javascript">
function validate()
{
var username= document.getElementById("uname");
var password= document.getElementById("pass");
if(username.value ==""||password.value=="")
{
alert("No blank")
return false;
}
else if(username.value=="Ratnesh Patil" && password.value=="123456789")
{
alert("Welcome Mr Ratnesh Patil")
true;
}
else
{
alert("wrong password")
return false;
}
}
</script>
</head>
<body>
<br>
<div>
<center><img src="logo.png" width="150px" height="150px"/></center>
</div>
<hr></hr>
<br>
<br>
<center>
<div class="background">
<br>
<br>
<form onsubmit="return validate()" action="index.html">
<label>Enter your details</label>
<br>
<br>
<input id="uname" placeholder="Username" type="text"/>
<br><br>
<input id="pass" placeholder="Password" type="password"/>
<br><br>
<button type="submit">Login In</button>
</form>
</div>
</center>
</body>
</html>