-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
27 lines (23 loc) · 878 Bytes
/
test.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
const List = document.getElementById('List');
const addNew = document.getElementById('Add-new');
const Contact = document.getElementById('Contact');
const bookdisplay = document.getElementById('bookdisplay');
const Addbook = document.getElementById('Addbook');
const contactSec = document.getElementById('contact-sec');
List.addEventListener('click', () => {
Addbook.classList.add('d-no');
bookdisplay.classList.remove('d-no');
contactSec.classList.add('d-no');
});
addNew.addEventListener('click', () => {
Addbook.classList.remove('d-no');
bookdisplay.classList.add('d-no');
contactSec.classList.add('d-no');
});
Contact.addEventListener('click', () => {
Addbook.classList.add('d-no');
bookdisplay.classList.add('d-no');
contactSec.classList.remove('d-no');
});
const dt = new Date();
document.getElementById('date-time').innerHTML = dt.toLocaleString();