我确实有一个带两个按钮的bootstrap模态确认对话框:继续和取消,取消操作效果很好(只是关闭模态窗口)但是继续不起作用,这是触发模态的按钮的代码窗口:
$http.put('/propt/' + components._id, {someValue:components.someValue})
这是模态窗口:
<button type="button" class="btn btn-danger" id="btn-cancelar" data-target="#basic" data-toggle="modal">
Cancelar
<span class="glyphicon glyphicon-remove-sign"></span>
</button>
这是按钮的jQuery click事件,继续id =“btnContinueDelete”
<div class="modal fade" id="basic" tabindex="-1" role="basic" aria-hidden="true" style="display: none;">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
<h4 class="modal-title">book Delete Confirmation</h4>
</div>
<div class="modal-body">
Are you Sure!!! You want to delete this Ad?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-info" id="btnContinueDelete">Continue</button>
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancel</button>
</div>
</div>
</div>
</div>
我的问题是模式窗口的按钮继续从不将用户重定向到特定的控制器 - 动作(MVC ASP.NET),请你帮我
答案 0 :(得分:0)
尝试
$(document).on("click","#btnContinueDelete",function () {
window.location.href = '@Url.Action(actionName: "TipoEvento", controllerName: "Home")';
});
因为它是动态添加的。