-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathirisIdentityDemo.html
158 lines (134 loc) · 3.39 KB
/
irisIdentityDemo.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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>虹膜识别OCX Demo</title>
<style>
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: relative; /* Stay in place */
z-index:2;
padding-top: 10px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
}
/* Modal Content */
.modal-content {
position: relative;
background-color: #fefefe;
padding: 0;
width: 30%;
border: 1px solid #888;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
-webkit-animation-name: animatetop;
-webkit-animation-duration: 0.4s;
animation-name: animatetop;
animation-duration: 0.4s
}
/* Add Animation */
@-webkit-keyframes animatetop {
from {top:-300px; opacity:0}
to {top:0; opacity:1}
}
@keyframes animatetop {
from {top:-300px; opacity:0}
to {top:0; opacity:1}
}
/* The Close Button */
.close {
color: white;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
.modal-header {
padding: 2px 16px;
background-color: #666666;
color: white;
}
.modal-body {padding: 2px 16px;}
.modal-footer {
padding: 2px 16px;
background-color: #5cb85c;
color: white;
}
</style>
<script type="text/javascript">
function StartEnroll()
{
irisIdentity.startEnroll();
}
function StopEnroll()
{
irisIdentity.endEnroll();
}
function SaveTemplate()
{
var firstname = document.getElementById("yourname").value;
irisIdentity.saveIrisTemplatesWithName(firstname);
}
function StartMatch()
{
irisIdentity.startMatch();
}
function EndMatch()
{
irisIdentity.endMatch();
}
</script>
</head>
<body>
<div style="text-align:center" >
<object classid="clsid:76E62D85-A6FF-4510-95A5-A85082B60E5A" id="irisIdentity" width="640" height="420" ></object>
</div>
<div>
<input type="button" value="开始注册" name="StartEnroll" onClick="StartEnroll()">
<input type="button" value="结束注册" name="StopEnroll" onClick="StopEnroll()">
<input type="button" value="保存模板" name="SaveTemplate" id="saveTemplate">
<input type="button" value="开始识别" name="StartMatch" onClick="StartMatch()">
<input type="button" value="结束识别" name="StartMatch" onClick="EndMatch()">
</div>
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<div class="modal-header">
<span class="close">×</span>
<h2>请输入您的名字:</h2>
</div>
<div class="modal-body">
姓名:<br>
<input type="text" id="yourname" value="wenhu"><br>
</div>
<div class="modal-body">
<input type="button" value="确定" name="confirm" id="confirm">
</div>
</div>
</div>
<script type="text/javascript">
var modal = document.getElementById('myModal');
var saveTemplateBtn = document.getElementById("saveTemplate");
var confirm = document.getElementById("confirm");
saveTemplateBtn.onclick = function() {
modal.style.display = "block";
}
confirm.onclick = function() {
modal.style.display = "none";
SaveTemplate();
}
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</body>
</html>