我在表單中有一個文本框,然後這個複選框被集中,我按下輸入表單提交。然而,這不是我想要的行爲。我想驗證表單並僅在點擊某個鏈接或按下文本框外的輸入時手動發送。這裏是我的形式的代碼JQM:禁用表單提交輸入時在文本框中按下
<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請求提交表單。我想禁用回車鍵提交表單當文本字段被聚焦