html
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
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
</head>
<body>
<h1>ATM</h1>
<hr>
<label>enter password:</label> <input type="number" id="a" value="">
<br>
<br>
<button id="bc">Go</button>
<br>
<h3 id="cos"></h3>
<hr>
<br>
<div id="mos">
<label>money Quantity:</label> <input type="number" id="b" value="">
<br>
<br>
<button onclick="bc()">Withdrawl</button>
</div>
<hr>
<br>
<label>account balance:</label> <label id="nos"></label>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
body {
text-align:center;
}
input{
border:4px solid;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
alert("password=2311");
$(document).ready(function(){
$("#mos").hide();
$("#bc").click(function(){
var bbt = document.getElementById("a").value;
if(bbt==="2311"){
$("#cos").text("correct password");
$("#mos").show("slow");
$("#a").hide();
} else {
$("#cos").text("wrong password");
}
})
})
function bc(){
var bbt = document.getElementById("b").value;
if (bbt>100000){
document.getElementById("nos").innerHTML="you withdrawl over the limit"
}
else{
document.getElementById("nos").innerHTML="₹"+bbt
}
}
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run