Detecting “value” of input text field after a keydown event in the text field?

后端 未结 6 776
死守一世寂寞
死守一世寂寞 2020-12-08 08:04

So my site has an input box, which has a onkeydown event that merely alerts the value of the input box.

Unfortunately the value of the input does not include the ch

6条回答
  •  时光取名叫无心
    2020-12-08 08:36

    Please, try to use oninput event. Unlike onkeydown, onkeypress events this event updates control's value property.

    
    

提交回复
热议问题