Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 自举';s远程模式对话框不工作_Twitter Bootstrap - Fatal编程技术网

Twitter bootstrap 自举';s远程模式对话框不工作

Twitter bootstrap 自举';s远程模式对话框不工作,twitter-bootstrap,Twitter Bootstrap,我在使用Twitter引导api中的远程模式对话框时遇到问题 我试图加载一个带有远程html页面内容的模式对话框。我有两个页面,一个包含按钮(modal remote.html),另一个包含我希望在单击按钮时显示的内容(modal target.html) 模态远程.html: 这是我的目标(或远程)页面代码 模态目标.html: × 模态头 敏捷的棕色狐狸跳过了懒狗 接近 保存更改 它们在同一个目录中。当我点击按钮时,什么也没发生。有人知道我做错了什么吗?非远程模式对话框工作正常,我就

我在使用Twitter引导api中的远程模式对话框时遇到问题

我试图加载一个带有远程html页面内容的模式对话框。我有两个页面,一个包含按钮(modal remote.html),另一个包含我希望在单击按钮时显示的内容(modal target.html)

模态远程.html


这是我的目标(或远程)页面代码

模态目标.html


×
模态头
敏捷的棕色狐狸跳过了懒狗

接近 保存更改

它们在同一个目录中。当我点击按钮时,什么也没发生。有人知道我做错了什么吗?非远程模式对话框工作正常,我就是不知道如何使用远程功能。

您应该仔细阅读

如果提供了远程url,则内容将通过jQuery的load方法加载并注入.modal主体

您的文件应该更像这样:

modal-remote.html:


×
模态头
接近
保存更改
modal-target.html:

敏捷的棕色狐狸跳过懒惰的狗


从Bootstrap v3.30开始,不推荐使用远程选项。看

因此,建议使用远程内容的方法是使用该方法

例如:

$("modal").load("remote_content.html");

注意,现在使用bootstrap3,内容将被注入模态元素的根中。看到和