PageSourceSearch

https://www.wodepcbfpc.com/js/js.js

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