我有一个表单,表单提交我使用$(“#CreateUpdateDetails”)。submit();在jquery。
此处表单提交表单元素正在被删除。但我需要像以前一样保留表单元素。我怎么能这样做。请帮我解决这个问题。
<form:form modelAttribute="ShoppingMetaData" method="POST" name="CreateUpdateDetails" action="CreateUpdateDetails" id="CreateUpdateDetails"
onsubmit="return(validate());">
<div id="updateBatchSelectionError"></div>
<div class="tool-container">
<fieldset>
<ul id="reportSelect">
<li>
<label for="shopName"> Shop Name :<span class="req">*</span></label>
<input name="shopName" id="shopName" type="text" class="required" />
</li>
<li>
<label for="rewardIdCr">Reward :<span class="req">*</span></label>
<select name="rewardIdCr" id="rewardIdCr" class="required">
<option selected="selected" value="--">Please Select</option>
</select>
</li>
<div class="tool-button-container">
<input style="width:70px;display:none;" id="shopUpdate" class="buOrange large" value="Update" onclick="submitUpdateBatch()"/>
</div>
</ul>
</fieldset>
</div>
</form:form>
function submitUpdateBatch(){
clearError();
$("#CreateUpdateDetails").submit();
}