-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterbilang.html
85 lines (72 loc) · 1.69 KB
/
terbilang.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Gunawan Pad, Tes Terbilang</title>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="js/terbilang.js"></script>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body, input, textarea, button, label{
font-size: 14px;
font-family: "segoe ui", "zilla slab", "open sans", sans-serif;
font-weight: 400;
}
body{
line-height: 30px;
}
input, textarea{
width: 200px;
}
textarea{
height: 150px;
}
h2 {
border-bottom: 1px solid #818181;
}
.page-wrap {
width: 200px;
display: block;
padding: 30px;
margin-bottom: 30px;
}
code,pre{
font-family: 'consolas' !important;
}
</style>
</head>
<body>
<div id="top" class="page-wrap">
<h2>Tes Terbilang</h2>
<label>Angka: </label><br>
<input type="text" id="input1" name="" value="93410,046" placeholder="input angka">
<br/>
<label>Hasil text: </label><br>
<textarea id="output" placeholder="output text"></textarea><br>
<button onclick="_terbilang();">Terbilang</button>
<script type="text/javascript">
var config = {
audioDir : 'audio', // direktori ke file audio
audioExt : 'mp3' // file ekstensi audio
};
var ot = new Terbilang(config);
ot.floatMaxLen = 5; // digit di belakang koma
// ot.comma = ","; // karakter koma, bisa diganti titik
function _terbilang() {
var text = ot.terbilangFloat($('#input1').val()); // hasil text
$('#output').val(ot.sambungSe(text));
ot.terbilangAudio(text, 0); // audio
}
</script>
<br>
<br>
<div>
terbilang.indonesia.text.audio.js
Copyright (C) 2018 Gunawan Padnanto
</div>
</div>
</body>
</html>