-
Notifications
You must be signed in to change notification settings - Fork 0
/
join.html
541 lines (538 loc) · 22.3 KB
/
join.html
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>e瞳网2016招新报名表</title>
<link rel="stylesheet" type="text/css" href="./css/mobiscroll-2.13.2.full.min.css">
<style>
* {
font-family: Arial, Helvetica, 黑体, sans-serif;
}
form * {
margin: 0;
padding: 0;
}
body {
font-size: 20px;
margin: 0 auto;
max-width: 640px;
}
@media screen and (max-width: 414px) {
body {font-size: 18px;}
}
@media screen and (max-width: 375px) {
body {font-size: 16px;}
}
@media screen and (max-width: 320px) {
body {font-size: 14px;}
}
form h1 {
margin: 1em 0 0.5em 0;
color: #00bca4;
font-size: 1.5em;
text-align: center;
}
form table {
width: 100%;
}
form td {
padding: 0.25em 0.5em;
vertical-align: top;
}
form .field {
margin-top: 0.3em;
color: #666;
font-size: 0.7em;
}
form input[type="text"], form input[type="date"], form input[type="email"], form select, form textarea, .placepicker select {
padding: 0.3em;
width: 100%;
background-color: #f9f9f9;
border: 1px solid #bdbdbd;
border-radius: 0.3em;
box-sizing: border-box;
}
form input[type="text"]:focus, form input[type="date"]:focus, form input[type="email"]:focus, form select:focus, form textarea:focus {
-webkit-box-shadow: 0 0 12px #38c;
-moz-box-shadow: 0 0 12px #38c;
box-shadow: 0 0 12px #38c;
outline: none;
}
form input[type="text"], form input[type="date"], form input[type="email"], form select {
font-size: 1em;
height: 2em;
}
form .gender label {
display: block;
float: left;
width: 50%;
color: #bdbdbd;
background-color: #f9f9f9;
border: 1px solid #bdbdbd;
text-align: center;
line-height: 2em;
box-sizing: border-box;
}
form .gender label:nth-child(1) {
border-radius: 0.3em 0 0 0.3em;
border-right-width: 0;
}
form .gender label:nth-child(2) {
border-radius: 0 0.3em 0.3em 0;
border-left-width: 0;
}
form .gender label.checked {
color: #000;
background-color: #e9e9e7;
}
form .gender input {
display: none;
}
form textarea {
font-size: 1em;
height: 5em;
resize: vertical;
}
form .submit {
text-align: center;
}
form input[type="submit"] {
padding: 0.7em;
width: 60%;
color: #fff;
background-color: #00bca4;
font-size: 1em;
border: 0;
border-radius: 0.5em;
}
form input[type="submit"].submitting {
background-color: grey;
}
form .invalid {
border-color: red !important;
}
.select-arrow {
position: relative;
}
.select-arrow select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
.select-arrow:after {
content: "";
position: absolute;
display: block;
margin-top: -11px;
top: 50%;
right: .5625em;
width: 22px;
height: 22px;
background-position: center center;
background-repeat: no-repeat;
background-color: rgba(0,0,0,.3);
background-image: url("data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20width%3D%2214px%22%20height%3D%2214px%22%20viewBox%3D%220%200%2014%2014%22%20style%3D%22enable-background%3Anew%200%200%2014%2014%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20style%3D%22fill%3A%23FFFFFF%3B%22%20points%3D%2211.949%2C3.404%207%2C8.354%202.05%2C3.404%20-0.071%2C5.525%207%2C12.596%2014.07%2C5.525%20%22%2F%3E%3C%2Fsvg%3E");
-webkit-border-radius: 1em;
border-radius: 1em;
pointer-events: none;
}
.dwv {
color: #00bca4 !important;
border-bottom: 3px solid #00bca4 !important;
}
.dwwol {
border-top: 2px solid #00bca4 !important;
border-bottom: 2px solid #00bca4 !important;
}
.dwb-e {
color: #00bca4 !important;
}
.dw-hl {
background-color: rgba(0,188,164,0.5) !important;
}
.alert * {
margin: 0;
padding: 0;
}
.alert {
display: none;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.7);
text-align: center;
}
.alert > div {
display: inline-block;
vertical-align: middle;
}
.alert-helper {
height: 100%;
}
.alert-content {
color: #000;
background: #f5f5f5;
border-radius: 0.3em;
}
.alert-content > h1{
padding: 0.5em;
color: #00bca4;
border-bottom: 2px solid #00bca4;
font-size: 1.2em;
}
.alert-content > div {
text-align: left;
padding: 1em;
}
.alert-content > div > p{
margin: 0.5em 0;
}
.alert-content > a{
display: block;
padding: 0.5em;
color: #00bca4;
text-decoration: none;
border-top: 1px solid #dbdbdb;
}
</style>
</head>
<body>
<div>
<form action="api/submit.php" method="post">
<h1>e瞳网招新表</h1>
<table>
<tbody>
<tr>
<td>
<label>
<p><input type="text" name="name"></p>
<p class="field">姓名 YOUR NAME</p>
</label>
</td>
<td>
<p class="input gender">
<label class="checked"><input type="radio" name="gender" value="1" checked>男</label>
<label><input type="radio" name="gender" value="0">女</label>
</p>
<div style="clear:both"></div>
<p class="field">性别 GENDER</p>
</td>
</tr>
<tr>
<td>
<label>
<p class="select-arrow"><input type="text" name="date"></p>
<p class="field">出生日期 DATE OF BIRTH</p>
</label>
</td>
<td>
<label>
<p class="select-arrow">
<select name="home"></select>
</p>
<p class="field">籍贯 PLACE OF BIRTH</p>
</label>
</td>
</tr>
<tr>
<td>
<label>
<p class="select-arrow">
<select name="college">
<option value="0">彭康书院</option>
<option value="1">仲英书院</option>
<option value="2">南洋书院</option>
<option value="3">文治书院</option>
<option value="4">崇实书院</option>
<option value="5">宗濂书院</option>
<option value="6">励志书院</option>
<option value="7">启德书院</option>
</select>
</p>
<p class="field">书院 COLLEGE</p>
</label>
</td>
<td>
<label>
<p><input type="text" name="class" placeholder="如:计算机61"></p>
<p class="field">专业班级 CLASS</p>
</label>
</td>
</tr>
<tr>
<td colspan="2">
<label>
<p><input type="text" name="tel" placeholder="面试通知将以短信的方式发送"></p>
<p class="field">手机号码 CELLPHONE NUMBER</p>
</label>
</td>
</tr>
<tr>
<td colspan="2">
<label>
<p><input type="text" name="qq"></p>
<p class="field">QQ号 QQ NUMBER</p>
</label>
</td>
</tr>
<tr>
<td colspan="2">
<label>
<p><input type="email" name="mail" placeholder="提交成功可收到邮件确认"></p>
<p class="field">电子邮箱 E-MAIL ADDRESS</p>
</label>
</td>
</tr>
<tr>
<td>
<label>
<p class="select-arrow">
<select name="first">
<option value="1">新闻部</option>
<option value="2" selected>新媒体部</option>
<option value="3">影视部</option>
<option value="4">市场部</option>
<option value="5">公关部</option>
<option value="6">产品部</option>
<option value="7">app组</option>
<option value="8">web组</option>
<option value="9">前端美工组</option>
</select>
</p>
<p class="field">第一志愿 FIRST</p>
</label>
</td>
<td>
<label>
<p class="select-arrow">
<select name="second">
<option value="0" selected>(未选)</option>
<option value="1">新闻部</option>
<option value="2">新媒体部</option>
<option value="3">影视部</option>
<option value="4">市场部</option>
<option value="5">公关部</option>
<option value="6">产品部</option>
<option value="7">app组</option>
<option value="8">web组</option>
<option value="9">前端美工组</option>
</select>
</p>
<p class="field">第二志愿 SECOND</p>
</label>
</td>
</tr>
<tr>
<td colspan="2">
<label>
<p><textarea name="info" placeholder="(选填 最多255个汉字)你有什么话要对我们说...(咱就别用emoji卖萌了,小瞳的服务器会受不了的[害羞])"></textarea></p>
<p class="field">个人陈述 WANNA SAY</p>
</label>
</td>
</tr>
</tbody>
</table>
<p class="submit"><input type="submit" value="确认提交"></p>
</form>
<div class="alert">
<div class="alert-helper"></div>
<div class="alert-content">
<h1>提示</h1>
<div class="alert-text"></div>
<a>确定</a>
</div>
</div>
</div>
<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script>
+function () {
window.alert = function (text) {
$(".alert-text").html("<p>" + text.split("\n").join("</p><p>") + "</p>");
$(".alert").fadeIn(200);
};
$(".alert a").click(function () {
$(".alert").hide();
});
}();
+function () {
// 单选效果
$('form .gender input[type="radio"]').click(function () {
$(this).closest("p").children("label").removeClass("checked");
$(this).closest("label").addClass("checked");
});
}();
+function () {
// 验证输入数据
function validate(jQueryObject, regexp, errmsg, strict) {
var val = jQueryObject.val();
if (regexp.test(val) || (!strict && val == "")) {
return "";
}
jQueryObject.addClass("invalid");
return errmsg + "\n";
}
function validateAll(strict) {
$("form .invalid").removeClass("invalid");
return validate($('form input[name="name"]'), /^.{1,10}$/, "姓名:1-10个汉字/英文字母", strict)
+ validate($('form input[name="class"]'), /^.{1,20}$/, "专业班级:1-20个汉字/英文字母", strict)
+ validate($('form input[name="tel"]'), /^(1((3\d)|(4[579])|(5[012356789])|(7[05678])|(8\d))\d{8})$/, "手机号段不存在", strict)
+ validate($('form input[name="qq"]'), /^[1-9]\d{4,10}$/, "QQ号格式不正确", strict)
+ validate($('form input[name="mail"]'), /^.+?@.+\..+?$/, "邮箱格式不正确", strict)
+ validate($('form select[name="second"]'), {
test: function (val) {
if (val === $('form select[name="first"]').val()) {
return false;
}
return true;
}
}, "第二志愿必须与第一志愿不同", strict)
+ validate($('form textarea[name="info"]'), /^.{0,255}$/, "个人陈述:0-255个汉字/英文字母", strict);
}
$("form").change(function () {
validateAll(false);
});
$("form").submit(function () {
var result = validateAll(true);
if (result !== "") {
alert(result);
return false;
}
// 暂时禁用按钮
$('form input[type="submit"]').addClass("submitting").attr("disabled", true);
var timeoutId = setTimeout(function () {
// 超时提示,然后恢复按钮
alert("连接超时\n请检查网络是否连接\n有问题可以加e瞳新生群552035254询问\n(也说不定是我们服务器出问题了)");
$('form input[type="submit"]').removeClass("submitting").attr("disabled", false);
}, 10000);
$.post($(this).attr("action"), $(this).serialize(), function (data) {
clearTimeout(timeoutId);
$('form input[type="submit"]').removeClass("submitting").attr("disabled", false);
if (data === '-1') {
alert("获取IP失败");
} else if (data === '-2') {
alert("同一IP多次提交\n有问题可以加e瞳新生群552035254询问\n(可能是我们后台web组的同学数据验证做得太狠,不小心误伤了)");
} else if (data === '-3') {
alert("数据不合理\n如果数据的确无误,可以请加e瞳新生群552035254询问\n(可能是我们后台web组的同学数据验证做得太狠,不小心误伤了)");
} else if (data === '-4') {
alert("提交数据失败");
} else if (data === '-5') {
alert("提交数据成功");
window.location.href = "ok.html";
} else if (data === '1') {
window.location.href = "ok.html";
} else {
alert("未知错误");
}
return false;
});
return false;
});
}();
</script>
<script src="js/mobiscroll-2.13.2.custom.min.js"></script>
<script>
+function () {
// 日历选择器
$('form input[name="date"]').val("1998-01-01").mobiscroll().date({
theme: 'android-holo-light',
lang: 'zh',
display: 'modal',
animate: 'fade',
buttons: ['set'],
rows: 5,
dateFormat: 'yy-mm-dd',
startYear: 1986,
endYear: 2006,
headerText: function (valueText) {
var array = valueText.split('-');
return array[0] + "年" + array[1] + "月" + array[2] + "日";
}
});
// 普通选择器
$('form select').each(function () {
$(this).mobiscroll().select({
theme: 'android-holo-light',
lang: 'zh',
display: 'modal',
animate: 'fade',
buttons: ['set'],
rows: 7,
headerText: $(this).closest("td").find(".field").text().split(" ")[0]
});
});
}();
+function () {
var districts = {
"北京市":["东城区","西城区","朝阳区","丰台区","石景山区","海淀区","门头沟区","房山区","通州区","顺义区","昌平区","大兴区","怀柔区","平谷区","密云区","延庆区","其他"],
"天津市":["和平区","河东区","河西区","南开区","河北区","红桥区","东丽区","西青区","津南区","北辰区","武清区","宝坻区","滨海新区","宁河区","静海区","蓟县","天津市郊县","其他"],
"河北省":["石家庄市","唐山市","秦皇岛市","邯郸市","邢台市","保定市","张家口市","承德市","沧州市","廊坊市","衡水市","其他"],
"山西省":["太原市","大同市","阳泉市","长治市","晋城市","朔州市","晋中市","运城市","忻州市","临汾市","吕梁市","其他"],
"内蒙古自治区":["呼和浩特市","包头市","乌海市","赤峰市","通辽市","鄂尔多斯市","呼伦贝尔市","巴彦淖尔市","乌兰察布市","兴安盟","锡林郭勒盟","阿拉善盟","其他"],
"辽宁省":["沈阳市","大连市","鞍山市","抚顺市","本溪市","丹东市","锦州市","营口市","阜新市","辽阳市","盘锦市","铁岭市","朝阳市","葫芦岛市","其他"],
"吉林省":["长春市","吉林市","四平市","辽源市","通化市","白山市","松原市","白城市","延边朝鲜族自治州","其他"],
"黑龙江省":["哈尔滨市","齐齐哈尔市","鸡西市","鹤岗市","双鸭山市","大庆市","伊春市","佳木斯市","七台河市","牡丹江市","黑河市","绥化市","大兴安岭地区","其他"],
"上海市":["黄浦区","徐汇区","长宁区","静安区","普陀区","虹口区","杨浦区","闵行区","宝山区","嘉定区","浦东新区","金山区","松江区","青浦区","奉贤区","崇明县","上海市郊县","其他"],
"江苏省":["南京市","无锡市","徐州市","常州市","苏州市","南通市","连云港市","淮安市","盐城市","扬州市","镇江市","泰州市","宿迁市","其他"],
"浙江省":["杭州市","宁波市","温州市","嘉兴市","湖州市","绍兴市","金华市","衢州市","舟山市","台州市","丽水市","其他"],
"安徽省":["合肥市","芜湖市","蚌埠市","淮南市","马鞍山市","淮北市","铜陵市","安庆市","黄山市","滁州市","阜阳市","宿州市","六安市","亳州市","池州市","宣城市","其他"],
"福建省":["福州市","厦门市","莆田市","三明市","泉州市","漳州市","南平市","龙岩市","宁德市","其他"],
"江西省":["南昌市","景德镇市","萍乡市","九江市","新余市","鹰潭市","赣州市","吉安市","宜春市","抚州市","上饶市","其他"],
"山东省":["济南市","青岛市","淄博市","枣庄市","东营市","烟台市","潍坊市","济宁市","泰安市","威海市","日照市","莱芜市","临沂市","德州市","聊城市","滨州市","菏泽市","其他"],
"河南省":["郑州市","开封市","洛阳市","平顶山市","安阳市","鹤壁市","新乡市","焦作市","濮阳市","许昌市","漯河市","三门峡市","南阳市","商丘市","信阳市","周口市","驻马店市","济源市","其他"],
"湖北省":["武汉市","黄石市","十堰市","宜昌市","襄阳市","鄂州市","荆门市","孝感市","荆州市","黄冈市","咸宁市","随州市","恩施土家族苗族自治州","仙桃市","潜江市","天门市","神农架林区","其他"],
"湖南省":["长沙市","株洲市","湘潭市","衡阳市","邵阳市","岳阳市","常德市","张家界市","益阳市","郴州市","永州市","怀化市","娄底市","湘西土家族苗族自治州","其他"],
"广东省":["广州市","韶关市","深圳市","珠海市","汕头市","佛山市","江门市","湛江市","茂名市","肇庆市","惠州市","梅州市","汕尾市","河源市","阳江市","清远市","东莞市","中山市","潮州市","揭阳市","云浮市","其他"],
"广西壮族自治区":["南宁市","柳州市","桂林市","梧州市","北海市","防城港市","钦州市","贵港市","玉林市","百色市","贺州市","河池市","来宾市","崇左市","其他"],
"海南省":["海口市","三亚市","三沙市","儋州市","五指山市","琼海市","文昌市","万宁市","东方市","定安县","屯昌县","澄迈县","临高县","白沙黎族自治县","昌江黎族自治县","乐东黎族自治县","陵水黎族自治县","保亭黎族苗族自治县","琼中黎族苗族自治县","其他"],
"重庆市":["万州区","涪陵区","渝中区","大渡口区","江北区","沙坪坝区","九龙坡区","南岸区","北碚区","綦江区","大足区","渝北区","巴南区","黔江区","长寿区","江津区","合川区","永川区","南川区","璧山区","铜梁区","潼南区","荣昌区","梁平县","城口县","丰都县","垫江县","武隆县","忠县","开县","云阳县","奉节县","巫山县","巫溪县","石柱土家族自治县","秀山土家族苗族自治县","酉阳土家族苗族自治县","彭水苗族土家族自治县","重庆市郊县","其他"],
"四川省":["成都市","自贡市","攀枝花市","泸州市","德阳市","绵阳市","广元市","遂宁市","内江市","乐山市","南充市","眉山市","宜宾市","广安市","达州市","雅安市","巴中市","资阳市","阿坝藏族羌族自治州","甘孜藏族自治州","凉山彝族自治州","其他"],
"贵州省":["贵阳市","六盘水市","遵义市","安顺市","毕节市","铜仁市","黔西南布依族苗族自治州","黔东南苗族侗族自治州","黔南布依族苗族自治州","其他"],
"云南省":["昆明市","曲靖市","玉溪市","保山市","昭通市","丽江市","普洱市","临沧市","楚雄彝族自治州","红河哈尼族彝族自治州","文山壮族苗族自治州","西双版纳傣族自治州","大理白族自治州","德宏傣族景颇族自治州","怒江傈僳族自治州","迪庆藏族自治州","其他"],
"西藏自治区":["拉萨市","日喀则市","昌都市","林芝市","山南地区","那曲地区","阿里地区","其他"],
"陕西省":["西安市","铜川市","宝鸡市","咸阳市","渭南市","延安市","汉中市","榆林市","安康市","商洛市","其他"],
"甘肃省":["兰州市","嘉峪关市","金昌市","白银市","天水市","武威市","张掖市","平凉市","酒泉市","庆阳市","定西市","陇南市","临夏回族自治州","甘南藏族自治州","其他"],
"青海省":["西宁市","海东市","海北藏族自治州","黄南藏族自治州","海南藏族自治州","果洛藏族自治州","玉树藏族自治州","海西蒙古族藏族自治州","其他"],
"宁夏回族自治区":["银川市","石嘴山市","吴忠市","固原市","中卫市","其他"],
"新疆维吾尔自治区":["乌鲁木齐市","克拉玛依市","吐鲁番市","哈密地区","昌吉回族自治州","博尔塔拉蒙古自治州","巴音郭楞蒙古自治州","阿克苏地区","克孜勒苏柯尔克孜自治州","喀什地区","和田地区","伊犁哈萨克自治州","塔城地区","阿勒泰地区","石河子市","阿拉尔市","图木舒克市","五家渠市","北屯市","铁门关市","双河市","可克达拉市","其他"],
"台湾省":["台北市","新北市","桃园市","台中市","台南市","高雄市","基隆市","新竹市","嘉义市","新竹县","苗栗县","彰化县","南投县","云林县","嘉义县","屏东县","宜兰县","花莲县","台东县","澎湖县","其他"],
"香港特别行政区":["中西区","湾仔区","东区","南区","油尖旺区","深水埗区","九龙城区","黄大仙区","观塘区","荃湾区","屯门区","元朗区","北区","大埔区","西贡区","沙田区","葵青区","离岛区","其他"],
"澳门特别行政区":["花地玛堂区","花王堂区","望德堂区","大堂区","风顺堂区","嘉模堂区","路凼填海区","圣方济各堂区","其他"],
"其他":["其他"]
};
var arr = [];
for (var i in districts) {
arr.push('<optgroup label="' + i + '">');
for (var j in districts[i]) {
if (i == "陕西省" && j == 0) {
arr.push('<option value="' + i + " " + districts[i][j] + '" selected>' + districts[i][j] + '</option>');
} else {
arr.push('<option value="' + i + " " + districts[i][j] + '">' + districts[i][j] + '</option>');
}
}
arr.push('</optgroup>');
}
// 地点选择器
var home = $('form select[name="home"]');
function onSelectHome() {
home.parent().find("input").val(home.val());
};
home.html(arr.join("")).mobiscroll().select({
theme: 'android-holo-light',
lang: "zh",
display: 'modal',
animate: 'fade',
buttons: ['set'],
rows: 9,
group: true,
fixedWidth: [130, 130],
headerText: home.closest("label").find(".field").text().split(" ")[0],
onSelect: onSelectHome
});
onSelectHome();
}();
</script>
</body>
</html>