Why using the extra word "return" in the attribute "return validate()" in html for js form validation? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why using the extra word "return" in the attribute "return validate()" in html for js form validation?

For example: <form onsubmit="return validate()" method="post">

13th Jun 2020, 4:45 AM
Romjan Ali
Romjan Ali - avatar
1 Answer
+ 5
Try without using 'return'
14th Jun 2020, 3:57 AM
shovan
shovan - avatar