【发布时间】:2016-09-22 11:52:18
【问题描述】:
可以删除部分代码:
<input type="hidden" id="alt_date" name="selArrivalDate" value='<?php $datetime = new DateTime('tomorrow'); echo $datetime->format('Ymd'); ?>' />
在提交按钮#bookingSubmitBtn2?
这里的表格:
$(document).ready(function() {
$("#bookingSubmitBtn").click(function() {
if ($("#children").val() == "") {
$("#children").remove();
}
$("#bookingForm").submit();
});
});
<form name="buchenForm" id="bookingForm" method="get" action="searchresult1.php">
<div>
<input type="text" id="datepicker" value='<?php $datetime = new DateTime('tomorrow'); echo $datetime->format('d/m/Y'); ?>' class="form-control" />
<input type="hidden" id="alt_date" name="selArrivalDate" value='<?php $datetime = new DateTime('tomorrow'); echo $datetime->format('Ymd'); ?>' />
</div>
<div class="form-group">
<button type="submit" id="bookingSubmitBtn1" formaction="searchresult1.php">Search 1</button>
</div>
<div class="form-group">
<button type="submit" id="bookingSubmitBtn2" formaction="searchresult2.php">Search 2</button>
</div>
</form>
【问题讨论】:
标签: javascript jquery html datetime