How to submit a form in Semantic UI?

后端 未结 8 1472
南旧
南旧 2021-02-04 07:57

I know how to validate a form using Semantic UI, and can even read in console the message \"Form has no validation errors, submitting.\" However, where is this submitting to? I

8条回答
  •  梦如初夏
    2021-02-04 08:31

    Semantic UI is based on jQuery and CSS so if you want to submit your form data you have some way to do that:

    1. Send your form data with AJAX

    2. Use some jqQuery plugins like this

    3. Trick!

      Put a submit button and set its display to none. When a user clicks on the div button throw that event to the submit button, in this way:

      $("div_button_selector").on("click", function(){
         $("input[type='submit']").trigger('click');
      });
      

提交回复
热议问题