填写一些没有表格的输入(文本,单词,数字)后的启用按钮

时间:2019-05-22 13:02:34

标签: jquery

我有4个输入(文本,数字,选择),没有表单,在单击某个按钮之前,我必须检查其值和类型。知道这一点,该按钮已经具有单击事件。我该怎么办?

<div class="input_price" style="margin-top: 10px;">
  <div class="form-group input-group ar">
    <select name="genderc" id="genderc" class="form-control ccm-input-select" title="Sexe " ccm-passed-value="" required>
      <option value="" selected="selected">Sexe </option>
      <option value="Mr">Homme</option>
      <option value="Mme">Femme</option>
    </select>
    <div id="error_input_gender" style="color:red; font-size: 12px;" hidden> * Required field</div>
  </div>
  <div class="form-group input-group ar">
    <input id="ln" type="text" name="ln" value="" class="form-control ccm-input-text" placeholder="Prénom" title="Prénom" required>
    <div id="error_input_ln" style="color:red; font-size: 12px;" hidden> * Required field</div>
  </div>
  <div class="form-group input-group ar">
    <input id="fn" type="text" name="fn" value="" class="form-control ccm-input-text" placeholder="Nom" title="Nom" required>
    <div id="error_input_fn" style="color:red; font-size: 12px;" hidden> * Required field</div>
  </div>
  <div class="form-group input-group ar">
    <input id="price_gift_card" type="integer" name="price_gift_card" value="" class="form-control ccm-input-text" placeholder="Prix" title="Prix" required>
    <div id="error_input_price" style="color:red; font-size: 12px;" hidden> * Required number field</div>
  </div>
  <button type="submit" name="add" id="add" class="btn btn-version-1">Add</button>
</div>

enter image description here

0 个答案:

没有答案