30 lines
925 B
JavaScript
30 lines
925 B
JavaScript
function openTab(evt, tabName) {
|
|
var i, tabcontent, tablinks;
|
|
tabcontent = document.getElementsByClassName("tabcontent");
|
|
for (i = 0; i < tabcontent.length; i++) {
|
|
tabcontent[i].style.display = "none";
|
|
}
|
|
tablinks = document.getElementsByClassName("tablinks");
|
|
for (i = 0; i < tablinks.length; i++) {
|
|
tablinks[i].className = tablinks[i].className.replace(" active", "");
|
|
}
|
|
document.getElementById(tabName).style.display = "block";
|
|
evt.currentTarget.className += " active";
|
|
}
|
|
|
|
function increment() {
|
|
var passengers = document.getElementById("passengers");
|
|
var value = parseInt(passengers.value, 10);
|
|
if (value < 50) {
|
|
passengers.value = value + 1;
|
|
}
|
|
}
|
|
|
|
function decrement() {
|
|
var passengers = document.getElementById("passengers");
|
|
var value = parseInt(passengers.value, 10);
|
|
if (value > 1) {
|
|
passengers.value = value - 1;
|
|
}
|
|
}
|