Recent Posts

Caution: Greetings to all visitors. The site is working in short. Links Please skip the link to view any topic and thank you for visiting
header ads

JS understanding form validation return value

Hello,
To avoid submitting a form the JavaScript-function (see below) must return false.
Why doesn't it work like that? (see below) The return value must be put into the anonymous function. Thanks!

 document.getElementById("myform").onsubmit = function() {
                  validate();
              };
         
             function validate () {
          
                 var element = document.getElementById("error_div");...
Code (JavaScript):
JS understanding form validation return value

from JavaScript https://ift.tt/3bZHcLm
via IFTTT

Post a Comment

0 Comments