Custom “confirm” dialog in JavaScript?

前端 未结 7 1025
悲&欢浪女
悲&欢浪女 2020-12-01 06:33

I\'ve been working on an ASP.net project that uses custom \'modal dialogs\'. I use scare quotes here because I understand that the \'modal dialog\' is simply a div in my ht

7条回答
  •  南方客
    南方客 (楼主)
    2020-12-01 07:01

    One other way would be using colorbox

    function createConfirm(message, okHandler) {
        var confirm = '

    '+message+'

    '+ '' + '
    '; $.fn.colorbox({html:confirm, onComplete: function(){ $("#confirmYes").click(function(){ okHandler(); $.fn.colorbox.close(); }); $("#confirmNo").click(function(){ $.fn.colorbox.close(); }); }}); }

提交回复
热议问题