Demo entry 6641292

新增

   

Submitted by anonymous on Sep 17, 2017 at 10:26
Language: JavaScript. Code size: 798 Bytes.

//新增弹窗提交
function addSubmit() {
    if ($("#addForm").form('validate')) {
        var data = $("#addForm").serialize();
        $.ajax({
            type: 'POST',
            url: "<%=basePath%>leaveMessageDeal/insertLeaveMessage.do",
            data: data,
            dataType: 'json',
            success: function(data) {
                insertSysLog($('#typeAdd').combobox('getText'), "新增", "标题为" + $("#biaoTiAdd").textbox('getText') + "信息");
                $.messager.alert('提示', '新增成功');
                $('#dg').datagrid('reload');
                $('#dlg_add').dialog('close');
            },
            error: function() {
                $.messager.alert('错误提示', '失败');
            }
        });
    } else {
        $.messager.alert('错误提示', '请完善红色必填项');
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).