jQuery function execute on Button Click and Enter/Return (key)

后端 未结 3 1805
盖世英雄少女心
盖世英雄少女心 2021-02-08 23:54

I\'m trying to create a little search box that allows you to search Twitter based on the keyword you enter in the input field. While it\'s work, it only works if you press the S

3条回答
  •  广开言路
    2021-02-09 00:20

    EDIT: As Spudley suggested "one of the main points of using jQuery is to stop you having to use event triggers embedded in the HTML markup" so a better solution would be

    
    

    OR - Previous proposal:

    
    

提交回复
热议问题