我正在尝试加载“远程”内容,基本上是通过 HTTP 请求(在同一站点上)发送的信息。返回的内容本身会抛出以下信息:
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">× </button>
<h3>Change Your Password</h3>
</div>
<div class="modal-body">
<form>
<fieldset>
<label>Your current password</label>
<input type="password" placeholder="password">
<label>Confirm current password</label>
<input type="text" placeholder="password">
<button type="submit" class="btn">Submit</button>
</fieldset>
</form>
</div>
<div class="modal-footer">
<a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
</div>
但是,对于显示远程内容的模态框,我相信我应该已经显示modal-body
该类:
<div class="modal fade hide" id="ajax">
<div class="modal-body">
<p>body content to be replaced</p>
</div>
</div>
我该如何解决这个问题,并提供完整的模态 div 内容并使其正确显示?