Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
simplemodal 可以确认持有功能吗?和alert()一样,alert()后面的代码在你点击之前不会运行。我试过了,但它不像这样工作。(我的英语很差,所以……)
简单模型有 2 个参数。确认(消息,回调)。将您的代码作为 JS 函数传递以回调参数。
confirm("Are you sure you want to logout", function () { //Your code here window.location.href = '@Url.Action("LogOff", "Account")'; });