我有一个包含五个输入字段的表单:
name="MultiRoomFromDate" //outputs the date in the following format "d-m-Y"
name="MultiRoomFromTimeH" // has a dropdown of "00" to "23"
name="MultiRoomFromTimeM" // has a dropdown of "00" to "59"
<select name="MultiFromDisplayTimeH" id="MultiFromDisplayTimeH" class="FormTime">
<option value="0">0</option>
<option value="3600">1</option>
<option value="7220">2</option>
<option value="10800">3</option>
<option value="14400">4</option>
</select>
<select name="MultiFromDisplayTimeM" id="MultiFromDisplayTimeM" class="FormTime">
<option value="0">0</option>
<option value="900">15</option>
<option value="1800">30</option>
<option value="2700">45</option>
</select>
如果我选择“MultiRoomFromDate”作为26-01-2020“,MultiRoomFromTimeH作为”09“,MultiRoomFromTimeM作为”00“,选择”MultiFromDisplayTimeH“作为”01“,将”MultiFromDisplayTimeM“选为”00“,并提交输出的表单:
FromDate = MultiRoomFromDate; //26-1-2020
FromHours = MultiRoomFromTimeH; //09
FromMins = MultiRoomFromTimeM; //00
DisplayHours = MultiFromDisplayTimeH; //3600
DisplayMins = MultiFromDisplayTimeM; //0
我需要做的是输出“FromDate,FromHours,FromMins”减去“DisplayHours”和“DisplayMins”作为Y-m-d H:i。
不负相思意
料青山看我应如是