onsubmit multiple javascript functions

后端 未结 7 611
你的背包
你的背包 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 09:01

    if all you need is make sure all functions return true before proceeding, then use && not || and to insure that the expression does not get evaluated pre-maturally by the return function put some extra brackets

提交回复
热议问题