开发者

Javascript EventKey function restriction between language switching

开发者 https://www.devze.com 2023-03-13 10:13 出处:网络
I have a javascript function that works on EventKey.the function is written in a way that \";\" and dot \".\" are disabled on the keyboard but there is a problem when i switch to arabic keyboard the l

I have a javascript function that works on EventKey.the function is written in a way that ";" and dot "." are disabled on the keyboard but there is a problem when i switch to arabic keyboard the letters that are placed on the place of ";" ". " are also disabled but i need to enable them.I need to know how to mention that we are using an arabic keyboard in way that when i click these two keycodes the arabic letters should be enabled so when i press these two keys the arabic letters would be written but in eng开发者_JAVA百科lish these same two keys are disabled. any help ?


Use the "onkeypress" instead of "onkeydown" or "onkeyup", then check the event "charCode".

0

精彩评论

暂无评论...
验证码 换一张
取 消