由于第二种形式的必填字段,无法提交第一张表格

时间:2015-09-02 11:30:08

标签: javascript html5 forms required

帮助 我想找到如何提交放置在第一个选项卡中的第一个表单而不涉及第二个选项卡必填字段的方法。 现在当我按下提交按钮时没有任何反应。这是因为,正在等待第二个选项卡中的第二个表单。我如何分开这些标签?

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="col-lg-3 ">
  <br>
  <ul class="nav nav-tabs nav-justified">
    <li class="active"><a data-toggle="tab" href="#first">First Tab</a></li>
    <li><a data-toggle="tab" href="#second">Second Tab</a></li>
  </ul>
  <div class="tab-content">
    <div class="row  tab-pane fade in active" id="first">
    <br>
      <div class="col-lg-12">
        <select class=" btn-block form-control" name="type1" required >
          <option value="a">AAAA</option>
          <option value="b">BBBB</option>
        </select>
        <br>
        <input type="number" name="type2" class=" btn-block form-control" step="25" min="200" required  >
        <br>
        <input type="number" name="type3" class=" btn-block form-control" min="0" required >
        <br>
        <button type="Submit" class="text-center btn-block btn-warning form-control"
          name="search1">Search Now</button>
       </div>
     </div>
     <div class="row  tab-pane fade" id="second">
       <br>
       <div class="col-lg-12">
         <select class=" btn-block form-control" name="type4" required >
          <option value="c">CCCC</option>
          <option value="d">DDDD</option>
        </select>
        <br>
        <input type="number" name="type5" class=" btn-block form-control" step="25" min="200" required  >
        <br>
        <input type="number" name="type6" class=" btn-block form-control" min="0" required >
        <br>
        <button type="Submit" class="text-center btn-block btn-warning form-control"
          name="search2">Search Now</button>
       </div>
  </div>
</div>
</div>

0 个答案:

没有答案