我有一段我想要克隆的代码。克隆有效,但我无法在克隆中选择选项。
我希望能够从选择字段中选择相同或不同的选项。但是当我克隆该部分时,这将被禁用。 请问我该怎么办?
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> </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> </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> </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> </td>
<td width="150"> </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> </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> </p>
&#13;
请帮帮我。