-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
45 lines (40 loc) · 1.16 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<script type="text/javascript" src="./convert-bech32-address-browser.js"></script><!-- include this file in browser.-->
<title>Test convert</title>
</head>
<body>
<style>
label {
display: inline-block;
width: 150px;
}
input {
width: 200px;
}
</style>
<label for="address">Source address: </label>
<input type="text" name="address" id="address" value="" placeholder="cosmos1....">
<br>
<label for="prefix">new address prefix:</label>
<input type="text" name="prefix" id="prefix" value="" placeholder="akash / sent / osmo / ...">
<br>
<br>
<button type="button" name="button" onclick="btnConvert_onClick()">Convert</button>
<br>
<br>
Output:
<div id="output">
</div>
<script type="text/javascript">
function btnConvert_onClick() {
var address = document.getElementById("address").value;
var prefix = document.getElementById("prefix").value;
var output = lookup(address, prefix); // use this "lookup" function in browser
document.getElementById("output").innerHTML = output;
}
</script>
</body>
</html>