-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathtest.html
41 lines (34 loc) · 1.34 KB
/
test.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
<!--
هذا الكود منشور تحت رخضة المشاع الإبداعي الإصدار 3.0
ويمكنك نشر، أو نسخ، أو إعادة توزيع الكود حتى للأغراض التجارية
Author: ASammour
E-mail: amsammour[at]gmail[dot]com
-->
<html>
<head>
<style>
h1,h3{
font-family: Traditional Arabic;
}
</style>
<script src="Tafqeet.js"></script>
<script>
function main (){
var fraction = document.getElementById("txt").value.split(".");
if (fraction.length == 2){
document.getElementById ("demo").innerHTML = tafqeet (fraction[0]) + " فاصلة " + tafqeet (fraction[1]);
}
else if (fraction.length == 1){
document.getElementById ("demo").innerHTML = tafqeet (fraction[0]);
}
}
</script>
</head>
<body>
<h1>أهلًا</h1>
<h1>اضغط على الرقم في الأسفل لتحويله لأرقام</h1>
<input type = "number" id = "txt" max = "99999999999999" step="any"/>
<input type = "button" id = "submit" onclick="main()" value = "تفقيط"/>
<h3 id="demo"></h3>
</body>
</html>