可以通过simplemodal确认保持功能吗?与alert()一样,alert()之后的代码在单击之前不会运行。我试过了,但它不能像这样工作。 (我的英语很差,所以......)
答案 0 :(得分:0)
简单模型有2个参数。确认(消息,回调)。 将您的代码作为JS函数传递给回调参数。
confirm("Are you sure you want to logout", function () {
//Your code here
window.location.href = '@Url.Action("LogOff", "Account")';
});