twitter-bootstrap – Twitter Bootstrap模式 – 加载“远程”内
我正在尝试加载“远程”内容,基本上是通过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> 但是,对于显示远程内容的模式框,我相信我应该已经显示了模态体类: <div class="modal fade hide" id="ajax"> <div class="modal-body"> <p>body content to be replaced</p> </div> </div> 如何绕过这个,并提供完整的模态div内容并使其正确显示? 解决方法
看起来你想用网页填充模态体.您可以使用a标记并使用data-target属性来调用模态:
< a id =“file_attach”data-toggle =“modal”href =“http://fiddle.jshell.net/jhfrench/6K8rD/show/”data-target =“#utility”class =“btn”>模态1< / a> Twitter documentation笔记
有关示例,请参阅http://jsfiddle.net/jhfrench/qv5u5/(有关如何在多个调用链接之间重新使用一个模态的详细信息,请参阅How can I reuse one Bootstrap modal div?). (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |