Easiest Way To Disable Form Submit On Enter Pressed | Javascript Tutorial | With Code Link

Published: 24 August 2019
on channel: Unpossible POG
2,361
25

Code Link:-
https://unpossiblepog.blogspot.com/20...

Please avoid or flag spams/hateful comments. And do not spam. Enjoy :)


Subscribe my Channel:-
http://www.youtube.com/user/SanketRoo...

Facebook Page:-
  / unpossiblens  

Twitter Account:-
  / unpossiblepog  

Blog :-
https://unpossiblepog.blogspot.in/

Stopping Form from submitting when “ENTER” key pressed.
Hello guys, this is unpossible pog here.
This tutorial will be about how you can stop submitting form when “Enter key” pressed.
As you can see I created one file with HTML form which submits form when “ENTER” key is pressed.
Second file contains php code to receive data.
Create a keydown attribute and type this.
Make sure to type event in rounded brackets.
Paste it at any textbox you want.
Then create that function in script tag. Dont forget to type evt argument.
Lets create a boolean variable.
Lets alert the keycode. C is capital.
If I hit “A” on keyboard, it alerts me its code 65.
And 66 is for B.
The “ENTER” key has keycode 13.
So we just have to change boolean variable “FALSE”, then return it.
Let’s test it.
If I type any keywords, it allows me to but it will not allow me to submit form when
ENTER is pressed.
Thank you for watching, dont forget to like share and subscribe.


On this page of the site you can watch the video online Easiest Way To Disable Form Submit On Enter Pressed | Javascript Tutorial | With Code Link with a duration of hours minute second in good quality, which was uploaded by the user Unpossible POG 24 August 2019, share the link with friends and acquaintances, this video has already been watched 2,361 times on youtube and it was liked by 25 viewers. Enjoy your viewing!