$('.inlineDatepickerDepart').datepick({ minDate: '<%=@start_display%>', maxDate: '<%=@end_display%>',
monthsToShow: 2,
dateFormat: "dd/mm/yyyy",
onSelect: function(date) {
var selected=parseInt(document.getElementById("guest_adult").value)+parseInt(document.getElementById("guest_kid").value); 警报(选中);
for(var x=0;x<selected;x++)
{
document.getElementsByClassName("depart1")[x].innerHTML = '2012-03-24';
document.getElementsByClassName("return1")[x].innerHTML = '2012-04-24';
}
},
});
警报显示客人的数量。它单独替换了离开 1 [0] 的值。不适用于整个循环和“返回 1”类。谁能给我解决问题的钥匙