通过bootstrap 弹出modal-dialog 子页面 ,例如我要弹出子页面:areaitem_sub_One.html。
具体步骤如下:
第一步:新建 areaitem_sub_One.html
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="exampleModalLabel">New message</h4>
</div>
<div class="modal-body">
<form>
<div class="form-group">
<label for="recipient-name" class="control-label">Recipient:</label>
<input type="text" class="form-control" id="recipient-name">
</div>
<div class="form-group">
<label for="message-text" class="control-label">Message:</label>
<textarea class="form-control" id="message-text"></textarea>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Send message</button>
</div>
第二步:
<a class="btn btn-primary" href="areaitem_sub_One.html" data-target="#modal" data-toggle="modal">添加下级区域</a>
第三布:
<!--弹出子页面 开始 -->
<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modal">
<div class="modal-dialog" style="width:90%;height:90%" role="document">
<div class="modal-content">
<!--//text.html内容会被加载到这里-->
</div>
</div>
</div>
<!--弹出子页面 结束 -->