PageSourceSearch

https://www.dah.com.tw/js/contact.js

js dah.com.tw collected 2026-10-02 21:10:17 UTC 2,389 bytes, 80 lines download raw bytes

1function verifyContactForm(myform){
2    var N_Name          = $("#N_Name").val();
3    var N_Tel           = $("#N_Tel").val();
4    var N_Mail          = $("#N_Mail").val();
5    // var N_Area          = $("#N_Area").val();
6    var N_Text          = $("#N_Text").val();
7    var PostAuthCode    = $("#PostAuthCode").val();
8    var Mode            = "Contact";
9
10    if(N_Name == ""){
11        alert("請輸入您的姓名");
12        myform.N_Name.focus();
13        return false;
14    }
15    if(N_Tel == ""){
16        alert("請輸入您的連絡電話");
17        myform.N_Tel.focus();
18        return (false);
19    }
20    if(N_Mail == ""){
21        alert("請輸入您的電子郵件");
22        myform.N_Mail.focus();
23        return (false);
24    }
25    if(N_Mail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z]+$/)==-1){
26        alert("EMAIL 格式不合");
27        myform.N_Mail.focus();
28        return false;
29    }
30    /*if(N_Area == ""){
31        alert("請輸入諮詢主題");
32        myform.N_Area.focus();
33        return (false);
34    }*/
35    if(N_Text == ""){
36        alert("請輸入內容");
37        myform.N_Text.focus();
38        return (false);
39    }
40    if(PostAuthCode == ""){
41        alert("請輸入驗證碼");
42        myform.PostAuthCode.focus();
43        return (false);
44    }
45
46    $("#btnContactSend").attr('disabled', true);
47    var ary = {
48        'N_Name'          : N_Name,
49        'N_Tel'           : N_Tel,
50        'N_Mail'          : N_Mail,
51        'N_Area'          : '',
52        'N_Text'          : N_Text,
53        'PostAuthCode'    : PostAuthCode,
54        'Mode'            : Mode
55    };
56    $.ajax({
57        type: "POST",
58        url: "ajax.php",
59        data: ary,
60        dataType: "text",
61        success: function(data) {
62            $("#btnContactSend").attr('disabled', false);
63            switch(data){
64                case '0X000':
65                    alert("對不起,您的認證圖片輸入錯誤!");
66                    return false;
67                    break;
68                case '1X000':
69                    alert("已送出完成,我們會盡快為您處理。");
70                    location.reload();
71                    break;
72            }
73        },
74        error: function(jqXHR, textStatus, errorThrown) {
75            $("#btnContactSend").attr('disabled', true);
76            alert('操作失敗');
77        }
78    });
79
80}

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.