-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
72 lines (61 loc) · 1.34 KB
/
Copy pathscript.js
File metadata and controls
72 lines (61 loc) · 1.34 KB
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
var themeSwitch;
var dropdown;
var dropdown2;
window.addEventListener('DOMContentLoaded', () => {
dropdown = document.querySelector('.dropdown');
dropdown2 = document.getElementById('d2');
themeSwitch = document.getElementById('theme');
themeSwitch.addEventListener('change', () => {
document.body.classList.toggle('dark');
});
});
function save(Smth) {
document.querySelector('.textBox').value = Smth;
}
function save2(Smth) {
document.querySelector('.textBox2').value = Smth;
}
function show() {
dropdown.classList.toggle("active");
}
function show2() {
dropdown2.classList.toggle("active");
}
var service;
var onbording;
var duration;
var total_costs;
function CalculateTotalPrice() {
service = document.querySelector('.textBox');
onbording = document.querySelector('.textBox2');
months = document.getElementById('duration');
let s1;
let s2;
switch (service.value) {
case "Mobile Application":
s1 = 15000;
break;
case "Web Application":
s1 = 15000;
break;
case "Technical Consultation":
s1 = 20000;
break;
default:
s1 = 150000;
break;
}
switch (onbording.value) {
case "Yes":
s2 = 50000;
break;
case "No":
s2 = 0;
break;
default :
S2 = 0;
break;
}
total_costs = 30000 + (s1 * months.value) + s2;
document.getElementById('total_costs').innerHTML = String(total_costs) + " Euro";
}