forked from tpsumeta/ThaiBath
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.html
More file actions
28 lines (26 loc) · 930 Bytes
/
Copy pathdemo.html
File metadata and controls
28 lines (26 loc) · 930 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
<!DOCTYPE html>
<html>
<head>
<title>Demo thaibath</title>
<meta charset="UTF-8">
</head>
<body>
<script src="thaibath.js" type="text/javascript" charset="utf-8"></script>
<input type="text" id="number" placeholder="">
<button type="button" onclick="myFunction()">ฮินดูเป็นตัวอักษร</button>
<button type="button" onclick="myFunction2()">เลขไทยเป็นตัวอักกษร</button>
<p id="text">ตัวอักษร</p>
<script type="text/javascript">
function myFunction(){
var monney = document.getElementById("number").value;
var thaibath = ArabicNumberToText(monney);
document.getElementById("text").innerHTML = thaibath;
}
function myFunction2(){
var monney = document.getElementById("number").value;
var thaibath = ThaiNumberToText(monney);
document.getElementById("text").innerHTML = thaibath;
}
</script>
</body>
</html>