见这里:JSFiddle 演示
Bootstrap alert.js 父父窗口不会关闭吗? (来自谷歌翻译!)
<div class="alert alert-danger fade in">
<h4>Oh snap! You got an error!</h4>
<p>Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.</p>
<ul class="pager">
<li class="previous"><a href="#" class="text-muted" data-dismiss="alert" aria-hidden="true"><i class="glyphicon glyphicon-eye-close"></i> Close</a></li>
<li class="next"><a href="#" class="text-muted"><i class="glyphicon glyphicon-fullscreen"></i> View</a></li>
</ul>
</div>