0
How to create two input, when I write characters in input1, show in input2 into circle?
4 Antworten
+ 3
<input type="text" id="inp1" onchange="document.getElementById('inp2').value=this.value;">
<input type="text" id="inp2" onchange="document.getElementById('inp1').value=this.value;">
+ 3
Use method charCodeAt() or charPointAt():
alert("test".charCodeAt(2));
... will output the code char of 's' in decimal format (you have to format it to hexadecimal if needed)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt
charPointAt() is required for unicode char stored on more than 2 octets (16bits)...
0
but how to write code if I write "a" in input1 , in input 2 show the unicode of chracter "a" that it is "Ⓐ"???
0
Thank you so much "visph "