如果要继续沿着引导路径前进,可以在这里看看:jsfiddle-Bootstrap 2.3.2
modal中的远程URI
请注意,URL必须位于同一域中(尽管您提到的是“内部”),否则,远程站点的Access-Control-Allow-
Origin设置将需要允许您的域。因此请记住,小提琴演示实际上无法从example.com加载内容。
<button type="button" data-toggle="modal" data-target="#myModal" data-remote="http://example.com">Launch modal</button><div id="myModal" > <div > <button type="button" data-dismiss="modal" aria-hidden="true"> × </button> <h3 id="myModalLabel">Modal header</h3> </div> <div > <!-- remote content will be inserted here via jQuery load() --> </div> <div > <button data-dismiss="modal" aria-hidden="true">Close</button> </div></div>
您不需要为此编写任何自定义Javascript-Bootstrap会根据数据属性(例如data-remote =“
http://example.com/whatever”和data-target =“#myModal”)知道要做什么。等等
有关更多信息,请参见Bootstrap模式文档的相关部分。



