克隆部分出现故障

时间:2015-05-21 13:37:42

标签: jquery html5 css3

我有一段我想要克隆的代码。克隆有效,但我无法在克隆中选择选项。

我希望能够从选择字段中选择相同或不同的选项。但是当我克隆该部分时,这将被禁用。 请问我该怎么办?

JS代码



<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>


<script type="text/javascript">
  // if Google is down, it looks to local file...
  if (typeof jQuery == 'undefined') {
    document.write(unescape("%3Cscript src='js/jquery-1.10.2.min.js' type='text/javascript'%3E%3C/script%3E"));
  }
</script>
<script type="text/javascript" src="js/clone-form-td.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>



<div id="wrapper">
  <div id="entry1" class="clonedInput">
    <p>&nbsp;</p>
    <h4 id="reference" name="reference" class="heading-reference">Entry #1</h4>
    <div class="row">
      <table width="400" cellspacing="0" cellpadding="2">
        <thead>
          <tr>
            <td class="field">
              <div class="input-group">
                <span class="input-group-addon"><i class="fa fa-briefcase"></i></span>
                <select class="form-control" id="e2" onChange="display(this,'Data','Voice');">
                  <option>Select Service:</option>
                  <option value="Data">Data Services</option>
                  <option value="Voice">Voice Services</option>
                </select>
              </div>
            </td>
          </tr>
        </thead>

        <tbody id="Voice" style="display: none;">
          <tr>
            <td class="title">Coming soon</td>
            <!--<td class="field"><input type="text" name="color" size="8" maxlength="7" /></td>-->
          </tr>
        </tbody>

        <tbody id="Data" style="display: none;">
          <tr>
            <td width="150">
              <br>Data Service Type:
              <br>
              <select class="form-control" id="e2" onChange="display(this,'P2P','Internet');">
                <option>Select Type:</option>
                <option value="P2P">P2P</option>
                <option value="Internet">Internet</option>
              </select>
              <p>&nbsp;</p>
            </td>
          </tr>
        </tbody>

        <tbody id="P2P" style="display: none;">

          <tr>
            <td colspan="3">Circuit ID:
              <input type="text" class="form-control">
            </td>
          </tr>
          <tr>
            <td width="150">
              <br>Point A:
              <br>
              <select class="form-control" id="e2" name="P2P">
                <option value="Ikeja">Ikeja</option>
                <option value="Lekki">Lekki</option>
              </select>
              <br>
              <br>Device:
              <br>
              <select class="form-control" id="e2" name="Device">
                <option value="">Switch</option>
                <option value="">DSLAM</option>
              </select>
              <br>
              <br>Port No.
              <br>
              <input type="text">
            </td>
            <td>&nbsp;</td>
            <td width="150">
              <br>Point B:
              <br>
              <select class="form-control" id="e2" name="P2P">
                <option value="Ikeja">Ikeja</option>
                <option value="Lekki">Lekki</option>
              </select>
              <br>
              <br>Device:
              <br>
              <select class="form-control" id="e2" name="Device">
                <option value="">Switch</option>
                <option value="">DSLAM</option>
              </select>
              <br>
              <br>Port No.
              <br>
              <input type="text" class="form-control">
            </td>
          </tr>
          <tr>
            <td width="150">
              <br>Bandwidth
              <br>
              <input type="text" class="form-control">
            </td>
            <td>&nbsp;</td>
            <td width="150">&nbsp;</td>
          </tr>

        </tbody>

        <tbody id="Internet" style="display: none;">
          <tr>
            <td colspan="3">Circuit ID:
              <br>
              <input type="text" class="form-control">
            </td>
          </tr>
          <tr>
            <td class="field">Bandwitch
              <br>
              <input type="text" class="form-control">
            </td>
            <td>&nbsp;</td>
            <td>IP Address
              <br>
              <input type="text" class="form-control">
            </td>
          </tr>

        </tbody>
      </table>
    </div>
  </div>
  <!-- end #entry1 -->
  <!-- Button (Double) -->
  <br>
  <p>
    <button type="button" id="btnAdd" name="btnAdd" class="btn btn-info">add another person</button>
    <button type="button" id="btnDel" name="btnDel" class="btn btn-danger">remove last added</button>
  </p>
  <p>&nbsp;</p>
&#13;
&#13;
&#13;

请帮帮我。

0 个答案:

没有答案