可以通过simplemodal确认保持功能吗?

时间:2013-10-23 02:52:27

标签: simplemodal confirm

可以通过simplemodal确认保持功能吗?与alert()一样,alert()之后的代码在单击之前不会运行。我试过了,但它不能像这样工作。 (我的英语很差,所以......)

1 个答案:

答案 0 :(得分:0)

简单模型有2个参数。确认(消息,回调)。 将您的代码作为JS函数传递给回调参数。

confirm("Are you sure you want to logout", function () {
            //Your code here 
            window.location.href = '@Url.Action("LogOff", "Account")';
        });