-
Notifications
You must be signed in to change notification settings - Fork 3
/
service.js
106 lines (73 loc) · 1.81 KB
/
service.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
let divs = document.querySelectorAll(".move");
let i =0;
let slideshow = setInterval(divslide,2000);
function divslide(){
divs.forEach((elem,i)=>{
elem.style.display="none";
});
if(i==divs.length){
i=0;
}
divs[i].style.display="grid";
i++;
}
let buyf={
name:"Resume display",
price:2047
}
let buys={
name:"Priority Applicant",
price:942
}
let buyt={
name:"Job Booster",
price:2047
}
let firstservice = document.querySelector(".firstservice");
firstservice.addEventListener("click",buy1);
function buy1(){
let name = buyf.name;
let price = buyf.price;
let savefirst={
name:name,
price:price
}
let arr=[];
arr.push(savefirst);
localStorage.setItem("buyfirst",JSON.stringify(arr));
window.location.href="./BuyService.html";
}
let secondservice = document.querySelector(".secondservice");
secondservice.addEventListener("click",buy2);
function buy2(){
let name = buys.name;
let price =buys.price;
let savefirst = {
name:name,
price:price
}
let arr=[];
arr.push(savefirst);
localStorage.setItem("buysecond",JSON.stringify(arr));
window.location.href="./BuyService.html";
}
let thirdservice = document.querySelector(".thirdservice");
thirdservice.addEventListener("click",buy3);
function buy3(){
let name = buys.name;
let price =buys.price;
let savefirst = {
name:name,
price:price
}
let arr=[];
arr.push(savefirst);
localStorage.setItem("buythird",JSON.stringify(arr));
window.location.href="./BuyService.html";
}
let form = document.querySelector("form");
form.addEventListener("submit",callit);
function callit(){
let name = document.querySelector("#name").value;
alert(`${name} Thank you for contacting us we will get back to you soon....`);
}