div class"coupon"?php if ( )?
Is there some reason you don't want to use a form?
Onkeydown catch_key; if(name_ie false) document.
Sign up for our newsletter and get our top new questions delivered to your inbox ( see an example ).Jquery (document).ready(function testKey function testKey if (event.You can get the value from the input and send it off.form input.keydown(function (e) if (yCode 13) var inputs if (dex(this) 1!If you are focus on the #inputbox input, the logic inside the condition will be called." / /div input type"submit" class"ds btn" name"apply_coupon" value"?php esc_attr_e( 'Apply Coupon 'woocommerce'?" /?php do_action( 'woocommerce_cart_coupon'?This is done glide2x.dll for need for speed 2 by binding a JQuery event to the input elements of the form and returning false if the key pressed is enter, which has the keyCode value.Post as a guest, name, email question feed lang-php Stack Overflow Stack Overflow Business Company site design / logo 2017 Stack Exchange Inc; user contributions licensed under cc by-sa.0 with attribution required.Null) dex(this) cus eventDefault return false; I can submit this form bt pressing teh Enter key when in a text input field (i.e if I use the Enter key instead of the tab key to move from one field to the next.div?php do_action(??php do_action( 'woocommerce_after_cart_table'?Please click the link in the confirmation email to activate your subscription.I tried to prevent this on my site using teh Jquery on this page but it did not work for me either.Edit, it's just perfectly working.Due to security restrictions it is impossible to change the key that was pressed to a tab, but the event we are looking for can be easily simulated.detect enter key if (yCode 13) / simulate submit button click btn-submit.click / stop form from submitting via enter key press eventDefault?There is no form!