javascript - capture input and convert characters

后端 未结 3 1041
谎友^
谎友^ 2021-01-06 13:07

I want to capture input charcters in text box, convert then according to a table and put them back in text box as user types.

Ent
3条回答
  •  感动是毒
    2021-01-06 13:32

    It might be better to do this when the value changes in the input, rather than when the key is pressed. Otherwise, other forms of input (pasting value) will bypass this substitution.

提交回复
热议问题