Javascript examples for Function:Function Return
Call functions in return statement
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> function a(){ console.log("A"); return false;/* w w w .j a va2 s. com*/ } function b(){ console.log("B"); return false; } function completeFormValidation(){ return a() && b(); } </script> </head> <body> <form action="http://www.google.com" onsubmit="return completeFormValidation();"> <button>test</button> </form> </body> </html>