Display confirmation message before send ajax request

前端 未结 6 630
说谎
说谎 2021-01-02 16:28

I have written an ajax function where I want to display confirmation meeessage before submitting the form. How should I add with my condition. Below is my code.

6条回答
  •  囚心锁ツ
    2021-01-02 17:22

    Write your ajax into a function like:

    function save(){
       // something in here 
    }
    

    After that write a confirmation functionality, if user confirm then call save() function

提交回复
热议问题