-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.js
32 lines (23 loc) · 813 Bytes
/
home.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
let form = document.querySelector("form")
// let btn = document.querySelector("button")
// btn.addEventListener("click", printdata)
let abt = document.querySelector("#form>div>a")
abt.addEventListener("click", printdata)
function printdata() {
let data = {
place: form.location.value,
fromDate: form.fromDate.value,
toDate: form.toDate.value
}
localStorage.setItem("Round-Trip", JSON.stringify(data))
}
let openit = document.querySelector("#aboutus>p")
openit.addEventListener("click", aboutus)
function aboutus() {
document.querySelector("#aboutus>ul").style.display = "block"
}
let closeit = document.querySelector("#aboutus>i")
closeit.addEventListener("click", closebox)
function closebox() {
document.querySelector("#aboutus>ul").style.display = "none"
}