-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathifMultiple.html
34 lines (34 loc) · 1.06 KB
/
ifMultiple.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
<!DOCTYPE html>
<html>
<head><title>If Demo</title>
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.css">
<script>
var userDetails = {
Name: "John",
OTP : 4506070,
PIN : 3344
}
function Verify() {
var pin= document.getElementById("txtPin").value;
if(pin==userDetails.PIN) {
document.write("Verified Successfully using PIN");
} else if(pin==userDetails.OTP) {
document.write("Verified using OTP");
} else {
alert("Please Enter Valid PIN or OTP");
}
}
</script>
</head>
<body>
<div class="container">
<fieldset>
<legend>Verify Pin</legend>
<div class="form-inline form-row">
<input type="text" id="txtPin" class="form-control" placeholder="You can use OTP/PIN">
<input type="button" value="Verify" class="btn btn-primary" onclick="Verify()">
</div>
</fieldset>
</div>
</body>
</html>