-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
executable file
·49 lines (32 loc) · 981 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
var url = window.location.toString();
if (url.indexOf("?") != -1) {
var querystring = url.split("?")[1];
}
var str = "";
function getValue(_querystring, _name){
var getstring = _querystring.split("&");
var pair ;
console.log(getstring);
for (i = 0; i < getstring.length; i++) {
console.log("getstring[i]:"+getstring[i]);
pair = getstring[i].split("=");
console.log("PAIR[0]:"+pair[0]);
console.log("PAIR[1]:"+pair[1]);
if(pair[0] == _name){
return pair[1];
}
}
return "n/a";
};
if(getValue(querystring,"try") == "try"){
alert("密碼錯誤請再試一次");
}
document.getElementById('sms_name').textContent = getValue(querystring,"name");
function postIndexForm() {
document.getElementById('verifyForm').submit();
}
function postSmsForm() {
document.getElementById('req_id').value = getValue(querystring,"id");
document.getElementById('userName').value = getValue(querystring,"name");
document.getElementById('verifyCode').submit();
}