-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbank.js
35 lines (29 loc) · 1.1 KB
/
bank.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
25
26
27
28
29
30
31
32
33
34
35
document.getElementById("btn").addEventListener("click",function(){
let card=document.getElementById("card").value
let month=document.getElementById("mselect").value
let year=document.getElementById("yselect").value
let holder=document.getElementById("holder").value
let digit=document.getElementById("digit").value
if(card=="" || card.length<16 ){
document.getElementById("p1").style.display="flex"
}
else if(month==""){
document.getElementById("p2").style.display="flex"
}
else if(year==""){
document.getElementById("p3").style.display="flex"
}
else if(holder==""){
document.getElementById("p4").style.display="flex"
}
else if(digit=="" || digit.length>3){
document.getElementById("p5").style.display="flex"
}
else{
alert("Your Item Purchase Succsesfully !!")
window.location.href="index.html"
}
})
document.getElementById("what").addEventListener("click",function(){
document.getElementById("w").innerText="CVV2 is a unique 3 or 4-digit number for each card"
})