ajax

$.ajax({
                cache: true,
                type: "POST",
                url:"<%=path%>/contact/Contact_sendMail.action",
                data:$('#contact_form').serialize(),// 你的formid
                async: false,
                error: function(request) {
                    //alert("Connection error");
                },
                success: function(responseText) {
                    alert(responseText)
                }
            });

}
原文地址:https://www.cnblogs.com/Arvin-9/p/5122586.html