استفسار سريع
إذا (e.currentTarget.id == "homeForm") {
تنبيه ("ASD1F2S1DF") ؛
e.preventDefault();
دع العلم = خطأ ؛
let protocol = window.location.protocol;
Let backpage = protocol + "//" + document.location.hostname + "/inquiryok?back =" + document.location.pathname;
إذا (emailValid & messageValid) {
العلم = صحيح ؛
}
إذا (علم) {
$.post(بروتوكول + "//inquiry.digoodcms.com/api/save/hanfengdianzi", $(this).serialize(), function(res, status) {
إذا (res.indexOf ('Inquiry Send Success') >= 0) {
window.location.href = backpage;
$ ("#homeForm").hide();
$(".submit-success").show();
}
});
}
}
});
الدالة getTimestamp() {
var d = التاريخ الجديد () ،
Y = d.getFullYear() ،
م = (d.getMonth() + 1) > 9؟ (d.getMonth() + 1): '0' + (d.getMonth() + 1),
D = d.getDate() > 9؟ d.getDate() : '0' + d.getDate() ،
ح = 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);
إرجاع الطابع الزمني + '، الإصدار =' + راند ؛
}
إذا ($('.message-aa338c537a48e08637dd81b6128f7740').length) {
$('.message-aa338c537a48e08637dd81b6128f7740').val('from: ' + window.location.href + ', date: ' + getTimestamp());
}
});