Form confirmation on submit

后端 未结 5 1543
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-21 03:58

I want to have a confirmation from the user before they submit a form. This will prevent accidental POSTing of the form, that may be incomplete or incorrect.

Here is my

5条回答
  •  北海茫月
    2021-01-21 04:55

    Try:

    
    function confirm_update() {
        if(confirm("Do you wish to update details?")) {
            return true;
        }
        else {
            return false;
        }
    }
    
    

提交回复
热议问题