You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Здравствуйте, подскажите какой тег использовать для увеличения значения, пример на картинке.
Вроде, про такой тег я слышала. Если есть тег прогресс бар, значит и такое должно быть.
Question
Rimming
"use strict"
var formElement = document.forms["searchform"];
var guests = formElement["searchform-guests-number"];
var rooms = formElement["searchform-guests-rooms"];
guests.min = 1;
guests.max = 6;
var MAX_GUESTS_PER_ROOM = 3;
function setMinAndMaxRooms(roomsElement, guestsNumber) {
roomsElement.min = Math.ceil(guestsNumber / MAX_GUESTS_PER_ROOM);
roomsElement.max = guestsNumber;
}
guests.value = 2;
setMinAndMaxRooms(rooms, guests.value);
rooms.value = rooms.min;
откуда rooms.min берет свое значение?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.