PageSourceSearch

https://www.winsolid-machining.com/wp-content/themes/winsolid/assets/js/js.js?ver=1718176846

js winsolid-machining.com collected 2026-10-07 04:18:11 UTC 7,433 bytes, 229 lines download raw bytes

1//获取url参数值
2function getQueryString(name) {
3    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
4    var r = window.location.search.substr(1).match(reg);
5    if (r != null) return unescape(r[2]); return null;
6}
7//重新获取验证码
8function ReGetVerifyCode(myIMG) {
9    MM_findObj(myIMG).src = "/admin/VerifyCodeImg.aspx?ID=" + MM_GetTime();
10}
11//获取时间
12function MM_GetTime() {
13    var d = new Date();
14    return d.getTime();
15}
16// //查找对象
17function MM_findObj(n, d) { //v4.0
18    var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
19        d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
20    }
21    if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
22    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
23    if (!x && document.getElementById) x = document.getElementById(n); return x;
24}
25// replace
26function MM_findObj(n, d) { //v4.01
27    return document.querySelector(`#${n}`)
28}
29//提交
30var ttt = 0;
31function validate() {
32    if ($("#name").val() == "") {
33        alert("Please enter your name!");
34        $("#name").focus();
35        return false;
36    }
37    if ($("#title").val() == "") {
38        alert("Please enter your title!");
39        $("#title").focus();
40        return false;
41    }
42    if ($("#Email").val() == "") {
43        alert("Please enter your Email!");
44        $("#Email").focus();
45        return false;
46    } else {
47        var myreg = /^[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/;
48        if (!myreg.test($("#Email").val())) {
49            alert("Email format error!");
50            $("#Email").focus();
51            return false;
52        }
53    }
54    if ($("#content").val() == "") {
55        alert("Please enter your content!");
56        $("#content").focus();
57        return false;
58    }
59
60    if (ttt == 1) { alert("Submit the interval to 5 seconds!"); return false; }
61    ttt = 1;
62
63    var strName, strTitle, strCompany, strTel, strEmail, strAddress, strContent, strYzm;
64    strName = $("#name").val();
65    strTitle = $("#title").val();
66    strCompany = $("#Company").val();
67    strTel = $("#tel").val();
68    strEmail = $("#Email").val();
69    strContent = $("#content").val();
70    strYzm = $("#yzm").val();
71
72    var timer1 = setTimeout("timerli()", 5000);
73
74    AddBook(strName, strTitle, strCompany, strTel, strEmail, strContent, strYzm);
75}
76//发送留言
77function AddBook(strName, strTitle, strCompany, strTel, strEmail, strContent, strYzm) {
78    try {
79        var url = window.location.pathname;
80        $.ajax({
81            type: "POST",
82            url: "/js/AjaxData.ashx",
83            data: "Action=AddBook&Name=" + encodeURIComponent(strName) + "&Title=" + encodeURIComponent(strTitle) + "&Company=" + encodeURIComponent(strCompany)
84                + "&Tel=" + encodeURIComponent(strTel) + "&Url=" + encodeURIComponent(url) + "&Email=" + encodeURIComponent(strEmail) + "&Content=" + encodeURIComponent(strContent) + "&Yzm=" + encodeURIComponent(strYzm),
85            success: function (ret) {
86                if (strTitle == "I'd like samples and price lists of your company.") {
87                    alert(ret);
88                    $("#AddEmail").val("");
89                }
90                else {
91                    if (ret == "200") {
92                        window.location.href = "/thank.html";
93                    }
94                    else {
95                        alert(ret);
96                    }
97                }
98            }
99        });
100    }
101    catch (ex) { }
102}
103function timerli() { ttt = 0; } //重置时间
104
105//重置
106function reset() {
107    $("#name").val("");
108    $("#title").val("");
109    $("#city").val("");
110    $("#tel").val("");
111    $("#Mobile").val("");
112    $("#Email").val("");
113    $("#Address").val("");
114    $("#content").val("");
115    $("#yzm").val("");
116
117}
118//小窗口提交
119var yyy = 0;
120function AddMessage() {
121    if ($("#tbxName").val() == "") {
122        alert("Please enter your Name!");
123        $("#tbxName").focus();
124        return false;
125    }
126
127    if ($("#tbxEmail").val() == "") {
128        alert("Please enter your Email!");
129        $("#tbxEmail").focus();
130        return false;
131    }
132    else {
133        var myreg = /^[^\.@]+@[^\.@]+\.[a-z]+$/;
134        if (!myreg.test($("#tbxEmail").val())) {
135            alert("Email format error!");
136            $("#tbxEmail").focus();
137            return false;
138        }
139    }
140    if ($("#tbxContent").val() == "") {
141        alert("Please enter your Message!");
142        $("#tbxContent").focus();
143        return false;
144    }
145    if ($("#tbxYzm").val() == "") {
146        alert("Please enter your Verification code!");
147        $("#tbxYzm").focus();
148        return false;
149    }
150    if (yyy == 1) { alert("Submit the interval to 5 seconds!"); return false; }
151    yyy = 1;
152
153    var strxEmail, strxName, strxContent, strxYzm;
154    strxName = $("#tbxName").val();
155    strxEmail = $("#tbxEmail").val();
156    strxContent = $("#tbxContent").val();
157    strxYzm = $("#tbxYzm").val();
158
159    var timer3 = setTimeout("timerli3()", 5000);
160
161    AddBook2(strxName, strxEmail, strxContent, strxYzm);
162}
163function AddBook2(strxName, strxEmail, strxContent, strxYzm) {
164    try {
165        $.ajax({
166            type: "POST",
167            url: "/js/AjaxData.ashx",
168            data: "Action=AddBook2&xName=" + escape(strxName) + "&xEmail=" + escape(strxEmail) + "&xContent=" + escape(strxContent)
169                + "&xYzm=" + escape(strxYzm),
170            success: function (ret) {
171                alert(ret);
172                ReGetVerifyCode('SendYzm');
173            }
174        });
175    }
176    catch (ex) { }
177}
178function timerli3() { yyy = 0; } //重置时间
179
180
181
182//提交email
183var zzz = 0;
184function AddEmail11(i, t, y) {
185    if ($("#AddEmail").val() == "") {
186        alert("Please enter your Email!");
187        $("#AddEmail").focus();
188        return false;
189    } else {
190        var myreg = /^[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/;
191        if (!myreg.test($("#AddEmail").val())) {
192            alert("Email format error!");
193            $("#AddEmail").focus();
194            return false;
195        }
196    }
197    if (zzz == 1) { alert(y); return false; }
198    zzz = 1;
199
200    strYuye = i;
201
202    var strName, strTitle, strCompany, strTel, strEmail, strAddress, strContent, strYzm;
203    strName = "-";
204    strTitle = "I'd like samples and price lists of your company.";
205    strCompany = "-";
206    strTel = "-";
207    strEmail = $("#AddEmail").val();
208    strContent = "-";
209    strYzm = "-";
210
211    var timer2 = setTimeout("timerli2()", 5000);
212
213    AddBook(strName, strTitle, strCompany, strTel, strEmail, strContent, strYzm);
214}
215//发送email
216function AddBook1(strEmail, strYuye) {
217    try {
218        $.ajax({
219            type: "POST",
220            url: "/js/AjaxData.ashx",
221            data: "Action=AddBook1&Email=" + escape(strEmail) + "&Yuye=" + escape(strYuye),
222            success: function (ret) {
223                alert(ret);
224            }
225        });
226    }
227    catch (ex) { }
228}
229function timerli2() { zzz = 0; } //重置时间

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.