how to develop yes no confirmation using jquery

前端 未结 3 949
遇见更好的自我
遇见更好的自我 2021-01-04 18:55

How to develop confirmation dialog with yes no button using jquery or any other method ? I need that confirmation when I click on submit button.

3条回答
  •  礼貌的吻别
    2021-01-04 19:01

    Use the native browser confirm dialog.

    if(confirm("Are you sure?"))
    {
        //Ok button pressed...
    }
    else
    {
        //Cancel button pressed...
    }
    

提交回复
热议问题