jquery validate: IF form valid then show submit button

后端 未结 3 2033
离开以前
离开以前 2020-12-17 04:51

I have a basic empty form and would like to only show the submit button once:

  1. Data has been entered into the form.
  2. All required/va
3条回答
  •  旧时难觅i
    2020-12-17 05:23

    There is no function in jQuery to do this. You need to bind an event to the submit of this form or to each of the fields and validate the required fields text length and if all are greater 0. then you can submit the form or fade in the submit button.

    The submnit event will be triggered when you hit an enter inside the form in any one of the fields.

    Take a look at this link.

    http://api.jquery.com/submit/

提交回复
热议问题