- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExample.html
More file actions
Latest commit
30 lines (30 loc) · 793 Bytes
/
Copy pathExample.html
File metadata and controls
30 lines (30 loc) · 793 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
29
30
<!DOCTYPE html>
<htmllang="en" dir="ltr">
<head>
<title>Example FixLanguageType.js</title>
<metacharset="utf-8">
<scripttype="text/javascript" src="FixLanguageType.min.js"></script>
</head>
<body>
<h1>Example FixLanguageType.js</h1>
<br><br>
Enter Text :
<inputtype="text" name="text" id="text">
<buttononclick="en_to_fa();">Convert to fa</button>
<buttononclick="fa_to_en();">Convert to en</button>
<br>
<divid="result"></div>
<scripttype="text/javascript">
vartext=document.querySelector("input#text");
varresult=document.querySelector("#result");
functionen_to_fa()
{
result.innerHTML=fixtype.en_fa(text.value.toLowerCase());
}
functionfa_to_en()
{
result.innerHTML=fixtype.fa_en(text.value);
}
</script>
</body>
</html>