У меня есть HTML разметки, как этотJQuery добавить строку после первой строки
<table class="left-column-form" id="ref-table">
<tr>
<th style="width:20%">Shipping Service Name</th>
<th style="width:20%">From Price</th>
<th style="width:20%">To Price</th>
<th style="width:20%">Price</th>
<th style="width:20%">Additional Price</th>
</tr>
<tr id="row">
<td style="width:20%;">
<select name="">
<option value="" selected>--Select-- </option>
<option value="service-one">Service One </option>
<option value="service-two">Service Two </option>
<option value="service-three">Service Three </option>
</select>
</td>
<td style="width:20%;">
<input type="text" name="from-price"/>
</td>
<td style="width:20%;">
<input type="text" name="to-price"/>
</td>
<td style="width:20%;">
<input type="text" name="price"/>
</td>
<td style="width:20%;">
<input type="text" name="additional-price"/>
</td>
</tr>
</table>
при том, что у меня есть одна кнопка, как этот
<input type="submit" id="add-services" value="Add Service" />
Я хочу, что, когда кто-то нажмет на кнопку он добавит еще одну строку, такую как
<tr id="row">
<td style="width:20%;">
<select name="">
<option value="" selected>--Select-- </option>
<option value="service-one">Service One </option>
<option value="service-two">Service Two </option>
<option value="service-three">Service Three </option>
</select>
</td>
<td style="width:20%;">
<input type="text" name="from-price"/>
</td>
<td style="width:20%;">
<input type="text" name="to-price"/>
</td>
<td style="width:20%;">
<input type="text" name="price"/>
</td>
<td style="width:20%;">
<input type="text" name="additional-price"/>
</td>
</tr>
сразу после первой строки. Так может кто-нибудь сказать мне, как сделать это в хорошей кодировке?
А вы пробовали, что до сих пор? – gview
За исключением того, что удостоверения личности отличаются друг от друга, это кажется совершенно тривиальным. Это предостережение просто превращает его от тривиального в легкое. – Barmar
В хорошем кодировании используйте php. Чтобы иметь возможность сделать более подходящее предложение, укажите, что вы надеетесь достичь, почему и что вы пробовали? – otherDewi