-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday_4.html
More file actions
36 lines (29 loc) · 957 Bytes
/
day_4.html
File metadata and controls
36 lines (29 loc) · 957 Bytes
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
<html>
<head>
<title>
Learn about inntertext.
</title>
</head>
<body>
<h3>Login</h3>
<br>
<label class="text-danger" id="errorMsg" style="color: red;"></label><br><br>
<label>Name</label>
<input type="text" id="input1">
<br><br>
<label>Password</label>
<input type="password" id="input2"><br><br>
<button type="submit" onclick="submit()" >Login</button>
<script type="text/javascript">
function submit(){
var input1 = document.getElementById("input1").value;
var input2 = document.getElementById("input2").value;
if(input1 === '' || input2 === '') {
document.getElementById("errorMsg").innerText = 'Please enter all the requirements.'
} else {
document.getElementById("errorMsg").innerText = 'Thank you.'
}
}
</script>
</body>
</html>