Try this:
document.getElementById('email').onkeydown = function(e){
if(e.keyCode == 13){
// submit
}
};
More Related Contents:
- JavaScript post request like a form submit
- jQuery AJAX submit form
- Prevent form submission on Enter key press
- JavaScript Form Submit – Confirm or Cancel Submission Dialog Box
- Want HTML form submit to do nothing
- Dynamically create and submit form
- Property ‘submit’ of object # is not a function
- HTML form with two submit buttons and two “target” attributes
- Avoid Angular2 to systematically submit form on button click
- Change value of input and submit form in JavaScript
- prevent form submission (javascript)
- React – clearing an input value after form submit
- Is there a better jQuery solution to this.form.submit();?
- Form submit button will not submit when name of button is “submit” [duplicate]
- html form that passes information to a variable in javascript [closed]
- Send POST data using XMLHttpRequest
- Submit form without page reloading
- Submit two forms with one button
- Prevent double submission of forms in jQuery
- How do I capture response of form.submit
- How to submit an HTML form without redirection
- How to get number of rows in using JavaScript?
- Form Submit Execute JavaScript Best Practice? [closed]
- Composing multipart/form-data with a different Content-Type on each parts with Javascript (or Angular)
- onsubmit multiple javascript functions
- Form ‘onsubmit’ not getting called
- How do I add validation to the form in my React component?
- Angularjs how to upload multipart form data and a file?
- a way to check validity of HTML5 forms?
- HTML form input tag name element array with JavaScript