javascript - Can anyone help me to use the enter key to execute this program? -


i have created small program pulls youtube api allows search random video whatever title enter when prompted. have working except, able hit enter key on keyboard run search. assume fix simple onkeydown event, have tried implement few ways , seems break every time. i'm not sure if because way calling onclicklistener or what. appreciated.

$('#searchterm').keydown(function(e){   if(e.keycode == 13){     search();   } }); 

Comments

Popular posts from this blog

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -