c253bcc97ff050426707d3f6769879a2e88bb314.svn-base
3.35 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
function initComplexArea(a, k, h, p, q, d, b, l) {
var f = initComplexArea.arguments;
var m = document.getElementById(a);
var o = document.getElementById(k);
var n = document.getElementById(h);
var e = 0;
var c = 0;
if (p != undefined) {
if (d != undefined) {
d = parseInt(d);
}
else {
d = 0;
}
if (b != undefined) {
b = parseInt(b);
}
else {
b = 0;
}
if (l != undefined) {
l = parseInt(l);
}
else {
l = 0
}
o[0] = new Option("请选择 ", 0);
n[0] = new Option("请选择 ", 0);
for (e = 0; e < p.length; e++) {
if (p[e] == undefined) {
continue;
}
if (f[6]) {
if (f[6] == true) {
if (e == 0) {
continue
}
}
}
m[c] = new Option(p[e], e);
if (d == e) {
m[c].selected = true;
}
c++
}
if (q[d] != undefined) {
c = 0; for (e = 0; e < q[d].length; e++) {
if (q[d][e] == undefined) { continue }
if (f[6]) {
if ((f[6] == true) && (d != 71) && (d != 81) && (d != 82)) {
if ((e % 100) == 0) { continue }
}
} o[c] = new Option(q[d][e], e);
if (b == e) { o[c].selected = true } c++
}
}
}
}
function changeComplexProvince(f, k, e, d) {
//获取当前js函数的参数集合
var c = changeComplexProvince.arguments;
//获取地籍区对象
var h = document.getElementById(e);
//获取地籍子区对象
var g = document.getElementById(d);
removeOptions(h);
var str = "";
f = parseInt(f);
//$("#" + e).html('<option value="0" >请选择</option>');
if (k[f] != undefined) {
str += "<option value='0' >请选择</option>";
for(var i = 1; i < 150; i++){
if(i <= 9){
i = "00"+ i;
}else if(i>9 && i <= 99){
i = "0"+ i;
}
if (k[f][parseInt(f.toString() + i.toString())] == undefined) continue;
str += "<option value='" + f.toString() + i.toString() + "' >" + k[f][parseInt(f.toString() + i.toString())] + "</option>";
}
$("#" + e).html(str);
}
removeOptions(g);
g[0] = new Option("请选择 ", 0);
}
function changeCity(c, a) {
$("#" + a).html('<option value="0" >请选择</option>');
$("#" + a).unbind("change");
c = parseInt(c);
var str = "";
var ii = "000";
str += "<option value='0' >请选择</option>";
for (var i = 1; i < 300; i++) {
if(i <= 9){
i = "00"+ i;
}else if(i>9 && i <= 99){
i = "0"+ i;
}
if (sub_arr[c][parseInt(c.toString() + i.toString())] == undefined) continue;
str += "<option value='" + c.toString() + i.toString() + "' >" + sub_arr[c][parseInt(c.toString() + i.toString())] + "</option>";
}
str += "<option value='" + c.toString() + ii.toString() + "' >" + sub_arr[c][parseInt(c.toString() + ii.toString())] + "</option>";
$("#" + a).html(str);
}
function removeOptions(c) {
if ((c != undefined) && (c.options != undefined)) {
var a = c.options.length;
for (var b = 0; b < a; b++) {
c.options[0] = null;
}
}
}