How to call a function when submit button is clicked and form onsubmit function is true? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 2

How to call a function when submit button is clicked and form onsubmit function is true?

I have made a form with a onsubmit function named "checkf()". I know that when the function returns true then the form will be validated. I want that when the "checkf()" is true then it should change the value of <div> height in css.(the div in which form is there.). How to do that?

26th Mar 2017, 9:37 AM
Aditya Kshitiz
Aditya Kshitiz - avatar
1 Réponse
+ 1
onSubmit="funcName()" function funcName() { document.getElementById("divName").height = value; }
28th Mar 2017, 6:10 AM
Eldar Bakerman