onsubmit multiple javascript functions

后端 未结 7 597
你的背包
你的背包 2020-11-30 08:31

Does anyone know how to onsubmit multiple functions? What I intented to do was: onsubmit checks if all these functions return true, if all of them return true, then I do the

7条回答
  •  执念已碎
    2020-11-30 08:35

    To validate my form I simply created a function called validateForm(){} then inside this function I put all the code which is needed for full validation. Then used onsubmit="validateForm()". It checks through it in order and only submits if all conditions are true.

提交回复
热议问题