这个要怎么处理?
代码:
function removelast(){
$("#mend").children("input[type='checkbox']:last").remove();
}
用个容器,如label把文字和checkbox括起,然后移除容器。要不文字和checkbox是2个不同的节点,你移除checkbox当然无法移除文字
<label><input type="checkbox"/>测试店2</label>
然后这样
function removelast(){
$("#mend").children("input[type='checkbox']:last").parent().remove();
}