PageSourceSearch

http://fampal.cn/js/contact.js

js fampal.cn collected 2026-10-09 00:53:45 UTC 2,250 bytes, 38 lines download raw bytes

1//检验提交数据格式合法性
2function checkNull() {
3    var title = $("input[name='txtTitle']").val();
4    var realname = $("input[name='txtRealname']").val();
5    var phone = $("input[name='txtPhone']").val();
6    var email = $("input[name='txtEmail']").val();
7    var content = $("textarea[name='txtContent']").val();
8    if (title == "") { alert("请输入咨询主题!"); $("input[name='txtTitle']").focus(); return false; }
9    if (realname == "") { alert("请输入姓名!"); $("input[name='txtRealname']").focus(); return false; }
10    if (phone == "") { alert("请输入手机号码!"); $("input[name='txtPhone']").focus(); return false; }
11    else if (!(/^13\d{9}$/g.test(phone)) && !(/^15\d{9}$/g.test(phone)) && !(/^18\d{9}$/g.test(phone)))
12    { alert("手机号码格式不对!"); $("input[name='txtPhone']").focus(); return false; }
13    if (email == "") { alert("请输入邮箱!"); $("input[name='txtEmail']").focus(); return false; }
14    else if (!/^[\w-]+(\.[\w-]+)*@[\w-]+(\.(\w)+)*(\.(\w){2,3})$/.test(email))
15    { alert("Email地址不合法!E-mail格式:[email protected]"); $("input[name='txtEmail']").focus(); return false; }
16    if (content == "") { alert("请输入留言内容!"); $("textarea[name='txtContent']").focus(); return false; }
17    document.getElementsByName('Button1')[0].disabled = true;
18    //提交信息开始
19    $.ajax({
20        type: "get",
21        url: "/Check/CheckMessage2.aspx?Title=" + escape(title) + "&Realname=" + escape(realname) + "&Phone=" + escape(phone) + "&Email=" + escape(email) + "&Content=" + escape(content),
22        success: function (msg) {
23            if (msg == "success") {
24                alert("恭喜你,提交成功!");
25                window.location.reload();
26            }
27            else if (msg == "failure") {
28                document.getElementsByName('Button1')[0].disabled  = false;
29                alert("很遗憾,提交失败!");
30            }
31            else if (msg == "error") {
32                document.getElementsByName('Button1')[0].disabled = false;
33                alert("您的请求带有不合法的参数,谢谢合作!");
34            }
35        }
36    });
37    //提交信息结束
38}

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.