-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
39 lines (27 loc) · 1.02 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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>romaji.js</title>
</head>
<body>
<input type='text' id="test1" value="ローマ" size='100' >
<button id="fromKana">fromKana(kana)</button>
<input type='text' id="test2" value="tsuzuku" size='100' >
<button id="toHiragana">toHiragana(romaji)</button>
<input type='text' id="test3" value="chāhan" size='100' >
<button id="toKatakana">toKatakana(romaji)</button>
<script src="romaji-min.js"></script>
<script>
document.getElementById('fromKana').onclick = function (){
document.getElementById('test1').value = romaji.fromKana(document.getElementById('test1').value);
}
document.getElementById('toHiragana').onclick = function (){
document.getElementById('test2').value = romaji.toHiragana(document.getElementById('test2').value);
}
document.getElementById('toKatakana').onclick = function (){
document.getElementById('test3').value = romaji.toKatakana(document.getElementById('test3').value);
}
</script>
</body>
</html>