Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to change an input character to another character?

luckyumerluckyumer Member Posts: 21
Please answer this

I am working on Unicode characters. I wish that if i press 'a' key on my textbox, it should replace to some other unicode character.

For example (something like that)



--- Javascript function ---

myfunc(){
if (event.keyCode==65) {
//Change keyCode to some unicode value like U+0800
}
}


[SO IF I PRESS A, IT CONVERT IT INTO SOME UNICODE CHARACTER]

I can also use

if (event.keyCode==65){
document.forms[0].textbox.value += //(MyUnicodeCharacter)
}

but that do not work if we enter something in the center of text. It will append our entry in the last of the textbox


***** PLEASE HELP. IT WILL BE SO MUCH HELPFUL FOR ME *****
Umer Saleem
Lahore - Pakistan
[email protected]
Mob: 0092 321 4257504
Sign In or Register to comment.