我在表单中有一个文本框,然后这个复选框被选中,我按 Enter 提交表单。然而,这不是我想要的行为。我想验证表单并仅在单击某个链接或在文本字段外按回车键时手动发送它。这是我的表格代码
<form action ="<?php echo $this->url(array('controller' => 'Queue','action' => 'checkinupcoming'))."/?confirmnumber=$this->confNumber&clientid=$this->clientId";?> " data-ajax="false" method= "post" class="checkin-form">
<h3>Customer Details</h3>
<ul class="form" style="margin: 10px 0 15px 27px">
<li id="descriptionLiId" class="first last descriptionLi">
<label id="lbldescriptionId" class="lbldescription">Description</label>
<input id="descTextId" class="descriptionText" tabindex="1" type="text" name="description" title="Enter visually identifying description" value="Enter visually identifying description" onfocus="onFocusBehavior(this);" onblur="onBlurBehavior(this);" />
</li>
</ul>
<h3 id="hdrnotesId" class="hdrnotes">Notes</h3>
<ul class="form">
<li id="notesListId" class="first last notesList">
<textarea id="notesId" class="text-area notes" tabindex="1" name="notes"></textarea>
</li>
</ul>
</form>
我通过序列化输入并发送 jquery ajax 请求来提交表单。当文本字段被聚焦时,我想禁用输入按钮上的表单提交