All galleries

Contact Us

24 hours online service

// // 表单验证 // $("body").append(""); // $("form").submit(function(e) { // // e.preventDefault(); // var emailEl = $(this).find("[name='email']"); // var messageEl = $(this).find("[name='message']"); // var telEl = $(this).find("[name='contact[tel]']"); // var emailValid = false, // messageValid = false, // telValid = false; // function formErrMsg(errText) { // $(".error-msg").html(errText); // $(".error-msg").stop().fadeIn(100); // setTimeout(() => { // $(".error-msg").stop().fadeOut(1000); // }, 3000); // } // if (emailEl.length) { // if (!/[-\w\.]+@[-\w\.]+(\.[-\w]+)+/.test(emailEl.val())) { // e.preventDefault(); // formErrMsg("Please enter the correct email address!"); // } else { // emailValid = true; // } // } // if (emailValid) { // if (messageEl.length) { // // var value = messageEl.val().trim(); // var value = messageEl.val(); // if (!/\S{10,}/g.test(value.replace(/\s/g, ""))) { // e.preventDefault(); // formErrMsg("Please enter your message with more than 10 characters!"); // } else { // messageEl.val(value); // messageValid = true; // } // } // } // if (emailValid && messageValid) { // var host = window.location.host; // if (telEl.length) { // var value = telEl.val().trim(); // if (/^(zh\-cn\.)/.test(host) || /\.risingcn\./.test(host)) { // if (!/^1[3456789]\d{9}$/.test(value)) { // e.preventDefault(); // formErrMsg("请输入正确的手机号码!"); // } // } else { // if (value.length) { // /* // if ( isNaN(value) ) { // e.preventDefault(); // formErrMsg("Please enter the correct mobile phone number"); // } // */ // } else { // /* // e.preventDefault(); // formErrMsg("Please enter your phone number"); // */ // } // } // } // } // if (e.currentTarget.id == "homeForm") { // // alert("asd1f2s1df"); // e.preventDefault(); // let flag = false; // let protocol = window.location.protocol; // let backpage = protocol + "//" + document.location.hostname + "/inquiryok?back=" + document.location.pathname; // if (emailValid && messageValid) { // flag = true; // } // if (flag) { // $.post(protocol + "//inquiry.digoodcms.com/api/save/kasontech2021", $(this).serialize(), function(res, status) { // if (res.indexOf('Inquiry Send Success') >= 0) { // // window.location.href = backpage; // $("#homeForm").hide(); // $(".submit-success").show(); // } // }); // } // } // }); // function getTimestamp() { // var d = new Date(), // Y = d.getFullYear(), // M = (d.getMonth() + 1) > 9 ? (d.getMonth() + 1) : '0' + (d.getMonth() + 1), // D = d.getDate() > 9 ? d.getDate() : '0' + d.getDate(), // h = d.getHours() > 9 ? d.getHours() : '0' + d.getHours(), // m = d.getMinutes() > 9 ? d.getMinutes() : '0' + d.getMinutes(), // s = d.getSeconds() > 9 ? d.getSeconds() : '0' + d.getSeconds(); // var timestamp = `${Y}/${M}/${D} ${h}:${m}:${s}`; // var rand = Math.random(); // rand = rand.toString().substr(3); // return timestamp + ', version=' + rand; // } // if ($('.message-fd106f0396adf1b73a05466c0469cf98').length) { // $('.message-fd106f0396adf1b73a05466c0469cf98').val('from: ' + window.location.href + ', date: ' + getTimestamp()); // } // }); // var isVerified = false; // function robotVerified() { // isVerified = true; // } // function onSubmit(e) { // if (!isVerified) { // e.preventDefault(); // alert("You need to complete verification to submit the form"); // } // }