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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -