-
Notifications
You must be signed in to change notification settings - Fork 3
/
Drop.js
34 lines (28 loc) · 1.03 KB
/
Drop.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
var acc = document.getElementsByClassName("accordion");
for (i = 0; i < acc.length; i++) {
acc[i].addEventListener("click", function () {
this.classList.toggle("active");
var panel = this.nextElementSibling;
if (panel.style.maxHeight) {
panel.style.maxHeight = null;
} else {
panel.style.maxHeight = panel.scrollHeight + "px";
}
});
}
var paymentDetails = JSON.parse(localStorage.getItem("paymentDetails")) || [];
document.querySelector(".itemprice").textContent = paymentDetails.Itemtotal
document.getElementById("totalprice").textContent = paymentDetails.Totalprice
document.getElementById("Submitdetails").addEventListener("click", Submitdetail);
function Submitdetail(){
if(carn.value.length<16 || cvv.value.length<3 || date.value.length<6){
alert("invalid user");
}
else{
window.location.href="otp.html"
}
}
document.querySelector(".btn").addEventListener("click", Paydetail);
function Paydetail(){
window.location.href="otp.html"
}