stopping form submit if the validation fails.

后端 未结 7 2263
青春惊慌失措
青春惊慌失措 2020-12-05 21:17

I am validating the dates in below function. If the validation fails, then the form should not get submitted. I tried returning false in form onsubmit but it still gets subm

7条回答
  •  隐瞒了意图╮
    2020-12-05 21:58

    I appreciate all contributions above. I have just applied the suggestions above to solve my challenge & it works fine. Keeping it simple I use the following:

    For the button I have

    
    

    My script is:

    
    

提交回复
热议问题