1. Location:Home > Message

                                Message

                                $("#contactForm").validator().on("submit", function (event) { if (event.isDefaultPrevented()) { // handle the invalid form... formError(); submitMSG(false, "Did you fill in the form properly ?"); } else { // everything looks good! event.preventDefault(); submitForm(); } }); function submitForm(){ // Initiate Variables With Form Content var name = $("#name").val(); var email = $("#email").val(); var mobile = $("#mobile").val(); $.ajax({ type: "POST", dataType: "json", url: "/form/", data: $('#contactForm').serialize(), success: function (result) { if (result.code == '0') { alert("Submission Failed"); } else { alert("Submitted successfully"); // window.location.href='/'; window.location.reload(); } }, error : function() { alert("網絡異常!"); } }); } function formSuccess(){ $("#contactForm")[0].reset(); submitMSG(true, "Message Submitted!") } function formError(){ $("#contactForm").removeClass().addClass('shake animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){ $(this).removeClass(); }); } function submitMSG(valid, msg){ if(valid){ var msgClasses = "h5 text-center tada animated text-success mt-3"; } else { var msgClasses = "h5 text-center text-danger mt-3"; } $("#msgSubmit").removeClass().addClass(msgClasses).text(msg); } }(jQuery)); // End of use strict
                                久96在线精彩视频_在线免费农村A网站_限制级福利影院在线观看_波多野结衣丝裤袜在线观看
                                                            1. Home

                                                              Message

                                                              Tel

                                                              Top