SSM:前端问题处理- jQuery

 多选框选中

        $("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
    })
}

猜你喜欢

转载自blog.csdn.net/qq_43532342/article/details/83989221