-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
65 lines (62 loc) · 1.41 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
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Words To Number</title>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<script src="dist/index.umd.js"></script>
<style>
* {
font-family: 'Open Sans', sans-serif;
margin: 0;
padding: 0;
}
h1 {
margin: 20px;
}
h2 {
margin: 10px;
}
.container {
width: 100%;
max-width: 960px;
margin: 0 auto;
}
#query {
width: 80%;
width: calc(100% - 62px);
border-width: 1px;
border-radius: 5px;
margin: 20px;
padding: 10px;
font-size: 1em;
}
#output {
background-color: lightgray;
width: 80%;
width: calc(100% - 60px);
padding: 10px;
margin: 20px;
min-height: 40px;
}
</style>
</head>
<body>
<div class="container">
<h1>Words to Number (WtoN)</h1>
<h2>Input</h2>
<textarea id="query" placeholder="type some numeric words here"></textarea>
<h2>Output</h2>
<div id="output">
</div>
</div>
<script charset="utf-8">
var query = document.querySelector('#query');
var output = document.querySelector('#output');
query.addEventListener('keyup', function () {
output.innerText = WtoN.convert(query.value);
});
</script>
</body>
</html>