多选框选中
$("input:checkbox:checked").each(function () {
alert($(this).val());
$(this).parents("tr").remove();
})
增强版:
function deleteCheck() {
if (confirm("是否删除?")) {
$(function () {
$("input:checkbox:checked").each(function () {
if ($(this).val() != "all") {
$(this).parents("tr").remove();
}
})
})
}
}
进入加载
<c:if test="${empty stores}">
<script type="text/javascript">
$(function () {
submitForm();
})
</script>
</c:if>
<button type="submit">保存并提交</button>
提交表单
function submitForm() {
$(function () {
$("form").submit();// 提交from
})
}