enter - How do I call a Javascript Function using JQuery? -


i i'd javascript function called jquery script:

document.location.href = 'http://cse.google.com/cse?cx=009002930969338329916:kta6o_isob0&q=' + escape(document.getelementbyid('search-box').value) 

i'm using caret coding program, use chromebook.

live event handling removed in jquery 1.9, using 1.11., try using on instead. chrome works fine.

here fiddle https://jsfiddle.net/atg5m6ym/359/

also check keyup returning 13 need.

$(document).ready(function() {   $('#search-box').on("keyup", function(event) {     $('#submit').click(); }); }); 

if input in label on keyup you'll see hello world.

if(event.keycode == '13') enter or return key


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -