jsMap.js
1.74 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
function JsMap()
{
this._array = new Array();//Map배열
this.pointer = 0;
this._getIndexByKey = function(key)
{
for(var i=0; i< this._array.length; i++)
{
if(key == this._array[i][0])
{
return i;
}
}
return -1;
}
this.put = function(key,value)
{
var index = this._getIndexByKey(key)
if(index == -1)
{
var newArray = new Array();//key와value를 담는 배열
newArray[0] = key;
newArray[1] = value;
this._array[this._array.length] = newArray;
}
else
{
this._array[index][1] = value;
}
}
this.get = function(key)
{
for(var i=0; i < this._array.length; i++)
{
if(this._array[i][0] == key)
return this._array[i][1];
}
}
this.isNext = function()
{
var result;
if(this._array.length > this.pointer)
{
result = true;
}
else
{
result = false;
}
this.pointer++;
return result;
}
this.size = function()
{
return this._array.length;
}
this.nowKey = function()
{
return this._array[this.pointer -1][0];
}
this.nowValue = function()
{
return this._array[this.pointer -1][1];
}
this.initMsg = function()
{
//---- New Msg ----//
this.put("TxtPickUpLocation", "영문/한글 도시 이름을 입력") ;
this.put("TxtReturnLocation", "영문/한글 도시 이름을 입력") ;
this.put("RateQualifier", "오른쪽 요금조회 버튼 클릭후 선택") ;
this.put("airMemId","멤버쉽 번호") ;
this.put("PromotionCode","쿠폰 코드") ;
this.put("mem_fnm_en", "ex : HONG") ;
this.put("mem_lnm_en", "ex : KILDONG") ;
this.put("mem_id", "아이디") ;
this.put("mem_pw", "비밀번호") ;
this.put("agent_no", "사업자등록번호") ;
this.put("agent_id", "담당자 아이디") ;
this.put("agent_pw", "비밀번호") ;
}
}