what happens after a form is submitted?

后端 未结 4 1850
故里飘歌
故里飘歌 2021-01-26 00:45

This might be a broad answer to give but i\'l try to shorten it up. What i am trying to do is use a form to get some information from the user and \"validate the form\" using Ja

4条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-26 00:56

    If you want to validate data before submitting, you need to listen for the submit event of the form. Inside the listener you can retrieve the data from inputs, validate it, set appropriate warnings, if necessary and so on. If the validation failed, you can prevent submitting returning false from the listener.

提交回复
热议问题