<% (1..3).each do %>
<p id="input">
<input type="text" name="somename"/>
<a class="remove" >Remove</a>
</p>
<% end %>
Run Code Online (Sandbox Code Playgroud)
jQuery的:
var $remove=$(".remove")
$remove.click(
function(){
$(this).parent().remove();
alert($remove.length);
})
Run Code Online (Sandbox Code Playgroud)
它总是警告3,为什么?我remove是否正确删除了课程?
| 归档时间: |
|
| 查看次数: |
72 次 |
| 最近记录: |