forked from code4sabae/zipcode-japan-es
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
33 lines (27 loc) · 861 Bytes
/
index.html
File metadata and controls
33 lines (27 loc) · 861 Bytes
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 lang="ja"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width">
<title>PostalCode.js - 郵便番号から住所</title>
</head><body>
<div>
<h1>PostalCode.js - 郵便番号から住所</h1>
〒<input type=text id=postalcode><br>
↓<br>
<textarea id="result" style="width:90vw;height:20em;"></textarea>
</div>
<!--
<script type="module">
import { PostalCode } from "./PostalCode.js";
PostalCode.setDataPath("./"); // you can change path
</script>
-->
<hr>
<a href="https://github.com/code4fukui/PostalCode/">src on GitHub</a>
<script type="module">
import { PostalCode } from "./PostalCode.js";
postalcode.onkeyup = postalcode.onchange = async () => {
const code = postalcode.value;
const json = await PostalCode.decode(code);
result.value = JSON.stringify(json, null, 2);
};
</script>
</body>
</html>