0

I've developed log in page in my project and I want to submit log in credentials when user presses enter key directly. (Now in the page user has to click on submit via mouse after typing ID and PASSWORD)

So can anybody help me how can I use it using javascript or any other way ?

Rakesh
  • 11
  • 1
  • 1
  • 2
  • 1
    You need to post code so we can take a look at what you're doing. Generally speaking, if you've set your form up correctly, most browsers will submit on enter automatically. – Sajan Parikh Jul 24 '13 at 06:56
  • Check the below link [click here][1] [1]: http://stackoverflow.com/questions/10858178/jquery-function-execute-on-button-click-and-enter-return-key/10858226#10858226 – user2119324 Jul 24 '13 at 07:24
  • @user2119324 Thank you. and sorry I cant add reputation as I am a newbie..... :) – Rakesh Jul 24 '13 at 07:40

1 Answers1

0

If your "input" elements are in a "form" element, pressing [Enter] should automatically submit the form... Like if you click on the button with the type="submit".

If you're asking to submit a form without having a submit button, here is a possibility submitting-a-form-by-pressing-enter-without-a-submit-button

Community
  • 1
  • 1
ylerjen
  • 4,109
  • 2
  • 25
  • 43