<tbody id="66h44"></tbody><bdo id="66h44"></bdo>
    1. <track id="66h44"></track>

      <track id="66h44"></track>

      1. 在線留言

        當前位置:  首頁 > 聯系我們 > 在線留言


        在線留言

         

         

        $("#contactForm").validator().on("submit", function (event) { if (event.isDefaultPrevented()) { // handle the invalid form... formError(); submitMSG(false, "你把表格填好了嗎 ?"); } 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("提交失?。赫垯z查信息是否完整,格式是否正確!"); } else { alert("提交成功!"); // 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 ?