How to call function from text input key press in javascript?

后端 未结 3 1596
耶瑟儿~
耶瑟儿~ 2021-01-24 05:38

With


the alert box displays the value in the box, not included the current key dep

3条回答
  •  粉色の甜心
    2021-01-24 06:14

    It should exhibit the same behaviour. Make sure you load the javascript either in your head or body tags, so you can access the function from the html.

    This code works for me:

    
        
    

提交回复
热议问题