0
我需要jQuery的東西,這讓實現以下functionlity添加functionlity與驗證:如何實現克隆使用jQuery
1)上的「按鈕」的點擊,它應該允許增加新的(克隆)行元素(如如下面的HTML所示)。
2)在行元素中,它包含SELECT LIST,其綁定了CHANGE事件,如同一個下拉列表的選擇更改,填充另一個下拉列表。
3)此外,還有對點擊提交按鈕觸發的文本框進行驗證。所以,這也是基於文本框ID選擇器。
我無法實現上述功能,專門針對點#2和#3。
請指導我。
<a href="#" class="show_hide1" style="text-decoration: none; color: inherit; float: right;">
</a>
<h1 class="infoTitle clearfix">
Other Class Information</h1>
<br />
<div id="hsOther" class="piTable slidingDiv1">
<div class="content1">
<table class="divclass" width="100%">
<tr class="tdStyle">
<td>
<label class="customFont" for="OtherInstitueName">
Class Name</label>
</td>
<td>
<label class="customFont" for="OtherAddress">
Street Address</label>
</td>
<td>
<label class="customFont" for="OtherCity">
City</label>
</td>
</tr>
<tr class="tdStyle">
<td class="tdStyle">
<select data-val="true" data-val-number="The field OtherStateId must be a number."
data-val-required="The OtherStateId field is required." id="Select1" name="OtherStateId"
style="font-family: Calibri; font-size: 16px;">
<option value=""></option>
<option value="NI">NI</option>
<option value="UT">UT</option>
<option value="IO">IO</option>
</select>
<select data-val="true" data-val-number="The field OtherStateId must be a number."
data-val-required="The OtherStateId field is required." id="selectClass" name="OtherStateId"
style="font-family: Calibri; font-size: 16px;">
<option value=""></option>
<option value="NI">NI</option>
<option value="UT">UT</option>
<option value="IO">IO</option>
</select>
</td>
<td class="tdStyle">
<input id="OtherAddress" maxlenght="200" name="OtherAddress" style="font-family: Calibri;
font-size: 16px;" type="text" value="" />
</td>
<td class="tdStyle">
<input id="OtherCity" maxlenght="50" name="OtherCity" style="font-family: Calibri;
font-size: 16px;" type="text" value="" />
</td>
</tr>
</table>
</div>
</div>