bootstrap 模式对话框中的 href
href in modal dialog in bootstrap
这是我的第一个 bootstrap 项目。如果用户在模态对话框中单击“是”按钮,我会尝试打开 url。但它不会像怀疑的那样工作:
这是我的代码:
<div class="modal inmodal fade" id="myModal6" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Delete?</h4>
</div>
<div class="modal-body">
<p><strong>You like to delete the files?</strong></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-white" data-dismiss="modal">No</button>
<button type="button" class="btn btn-primary" href="index.php?delete=yes">Yes</button>
</div>
</div>
</div>
</div>
“是”按钮不起作用。也许有人可以帮助我!
试试这样的标签而不是按钮
<a class="btn btn-primary" href="index.php?delete=yes">Yes</a>
这是我的第一个 bootstrap 项目。如果用户在模态对话框中单击“是”按钮,我会尝试打开 url。但它不会像怀疑的那样工作:
这是我的代码:
<div class="modal inmodal fade" id="myModal6" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4 class="modal-title">Delete?</h4>
</div>
<div class="modal-body">
<p><strong>You like to delete the files?</strong></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-white" data-dismiss="modal">No</button>
<button type="button" class="btn btn-primary" href="index.php?delete=yes">Yes</button>
</div>
</div>
</div>
</div>
“是”按钮不起作用。也许有人可以帮助我!
试试这样的标签而不是按钮
<a class="btn btn-primary" href="index.php?delete=yes">Yes</a>