jQuery UI confirm dialog not returns true/false

前端 未结 5 2000
清歌不尽
清歌不尽 2021-01-06 13:14

I have jQuery UI confirm dialog:

function fnComfirm(title, content) {
    $(\"#dialog:ui-dialog\").dialog(\"destroy\");
    $(\"#dialog-confirm p\").html(con         


        
5条回答
  •  温柔的废话
    2021-01-06 13:58

    function fnComfirm(title, content) {
        $("#dialog:ui-dialog").dialog("destroy");
        $("#dialog-confirm p").html(content);
        $("#dialog-confirm").dialog({
            title: title,
            resizable: false,
            height: 200,
            width: 486,
            modal: true,
            buttons: {
                "OK": function() {
                    //do whatever you need here, i.e. form post
                    alert('ok!');
                },
                Cancel: function() {
                    $( this ).dialog("close");
                    return false;
                }
            }
        });
    }
    

提交回复
热议问题