-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
27 lines (18 loc) · 827 Bytes
/
app.js
File metadata and controls
27 lines (18 loc) · 827 Bytes
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
let start = document.getElementById("button1");
let someMethod = document.querySelector('input[name="method"]:checked').value;
function getMethod() {
let someMethod = document.querySelector('input[name="method"]:checked').value;
if (someMethod == 'golden'){
document.location.replace("/goldenMethod/goldenMethod.html");
} else if (someMethod == 'bisection'){
document.location.replace("/bisectionMethod/bisection.html");
} else if (someMethod == 'dichotomy'){
document.location.replace("/dichotomyMethod/dichotomyMethod.html");
} else if (someMethod == 'fibonacci'){
document.location.replace("/fibonacciMethod/fibonacciMethod.html");
}
console.log("Выбран метод: ",someMethod);
}
start.addEventListener('click', function (){
getMethod()
})