-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
91 lines (81 loc) · 2.31 KB
/
test.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
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>会员卡管理系统</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="" name="description"/>
<meta content="" name="author"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="jRemoteValidate.js"></script>
<style type="text/css">
.container {width:600px;margin-top:20px;}
</style>
</head>
<body>
<div>
<div>
<section>
<div>
<div class="page-header">
<h2>会员查询</h2>
</div>
<div id="cardContainer1" class="container">
<label for="mobile1" style="float:left;">状态1:</label>
<input type="text" id="mobile1" />
</div>
<div id="cardContainer2" class="container">
<label for="mobile2" style="float:left;">状态2:</label>
<input type="text" id="mobile2" />
</div>
<div id="cardContainer3" class="container">
<label for="mobile3" style="float:left;">状态3:</label>
<input type="text" id="mobile3" />
</div>
<br>
</div>
</section>
</div>
</div>
<script>
$(function(){
$('#mobile1').jRemoteValidate({
url: 'json1.html',
//field: 'mobile',
renderTo: '#cardContainer1',
loadImgURL: 'loading_small.gif',
success: successHandle
});
$('#mobile2').jRemoteValidate({
url: 'json2.html',
//field: 'mobile',
renderTo: '#cardContainer2',
loadImgURL: 'loading_small.gif',
success: successHandle
});
$('#mobile3').jRemoteValidate({
url: 'json3.html',
//field: 'mobile',
renderTo: '#cardContainer3',
loadImgURL: 'loading_small.gif',
success: successHandle
});
function successHandle(rs) {
var html = '';
if(rs.state == 1) {
html = '<p class="msg">姓名:<font color=#4682B4>'+rs.data.name+'</font>,余额:<font color=red>'+rs.data.balance+'</font>元</p>';
}
if(rs.state == 2) html = '<p class="msg"><font color=red>卡号不存在</font></p>';
if(rs.state == 3) html = '<p class="msg"><font color=red>服务器异常 </font></p>';
return html;
}
});
</script>
</body>
</html>