-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo.html
33 lines (33 loc) · 1.02 KB
/
demo.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<meta name="viewport" content="width=800">
<title>Charec: Handwriting recognition demo</title>
<script src='./charec.js'></script>
<script>
window.addEventListener('load', function(){
var $canvas = document.getElementById('board');
var $output = document.getElementById('output');
var $reset = document.getElementById('reset');
var charlec = new Charlec($canvas, $output, $reset);
});
</script>
<style>
body {font-family:sans-serif;margin:10px;}
canvas {border:2px solid #777;display:inline-block;margin-right:15px;background:#eee}
#output {display:inline-block;vertical-align:top;text-align:center;}
button {margin:20px 0;}
</style>
</head>
<body lang='en'>
<h1>Handwriting recognition demo</h1>
<p>
Draw a number (from 1 to 9) on canvas.
<div>
<canvas id='board' height=350 width=350></canvas>
<div style='height:350px;width:350px;font-size:300px;' id='output'></div>
</div>
<button id='reset'>Reset canvas</button>
</body>
</html>