1 回答
TA贡献1824条经验 获得超8个赞
您可以在 html 中添加输入字段,然后将字段值关联到变量,如下所示: html
<label for="startHour1">start hour: </label><br />
<input type="text" id="startHour1" name="startHour1" /><br />
<label for="endHour1">end hour: </label><br />
<input type="text" id="endHour1" name="endHour1" /><br />
JavaScript
var starthour = document.getElementById("startHour").value;
selectConstraint: 'businessHours',
eventConstraint: 'businessHours',
businessHours: [
{
dow: [1, 2, 3], // Monday, Tuesday, Wednesday
start: starthour1 ,
end: endhour1
},
{
dow: [4, 5], // Thursday, Friday
start: starthour2 ,
end: endhour2
}
],
希望这有帮助!
- 1 回答
- 0 关注
- 104 浏览
添加回答
举报