1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| var value_type_full = 8;
var room_max = 5;
function def_room(val1,val2) {
var price_selected;
price_selected = val1.options[val1.selectedIndex].value;
if (price_selected==value_type_full) {
val2.options.length = 1;
val2.options[0].value = value_type_full;
val2.options[0].text = document.write(room_max);
val2.options.selectedIndex = 0;}
else {
val2.options.length = 3;
for (i=1; i<=3; i++){
val2.options[i-1].value = i;
val2.options[i-1].text = document.write(i);
}
val2.options.selectedIndex = 0;
}
} |
Partager