-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
40 lines (40 loc) · 1.17 KB
/
index.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
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<title>Capture Face</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script>
$(document).ready(function() {
$("form").submit(function(event) {
event.preventDefault();
var name = $("#name").val();
var id = $("#id").val();
$.ajax({
type: "POST",
url: "/capture",
data: { name: name, id: id },
success: function(response) {
alert(response);
},
error: function(error) {
alert("An error occurred.");
}
});
});
});
</script>
</head>
<body>
<h1>Capture Face</h1>
<form>
<label for="name">Name:</label>
<input type="text" id="name" name="name">
<br>
<label for="id">ID:</label>
<input type="text" id="id" name="id">
<br>
<input type="submit" value="Capture">
</form>
</body>
</html>