Skip to content

Instantly share code, notes, and snippets.

@kergalym
Created March 14, 2017 11:34
Show Gist options
  • Save kergalym/29d5777e96995c86d03468e022cd4449 to your computer and use it in GitHub Desktop.
Save kergalym/29d5777e96995c86d03468e022cd4449 to your computer and use it in GitHub Desktop.
<div class="layout-one" id="layout-one">
<input type="button" id="letter" name="dod" onclick="letter('1590')" value="ض"/>
<input type="button" id="letter" name="sod" onclick="letter('1589')" value="ص"/>
<input type="button" id="letter" name="tha" onclick="letter('1579')" value="ث"/>
<input type="button" id="letter" name="kaf" onclick="letter('1602')" value="ق"/>
<input type="button" id="letter" name="fa" onclick="letter('1601')" value="ف"/>
<input type="button" id="letter" name="ghayn" onclick="letter('1594')" value="غ"/>
....
</div>
<script>
function letter(symbol) {
var letter = String.fromCharCode(symbol);
document.getElementById('text').value += letter;
}
</script>
@kergalym
Copy link
Author

kergalym commented Mar 14, 2017

So, then another javascript function, which is not shown here accepts value of input text and handle every letter giving it one of the forms: nice, initial, medial, final and after that returns string as input text value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment