Javascript 引导URL模式没有出现?

Javascript 引导URL模式没有出现?,javascript,html,twitter-bootstrap,href,Javascript,Html,Twitter Bootstrap,Href,我目前是引导模态的初学者。我只是想问为什么外部URL没有出现在模式中 下面是一个关于我尝试做什么的示例: 以下是整个HTML文件: <!DOCTYPE html> <html lang="en"> <head> <title>Example of Bootstrap 3 Modals with Remote URL</title> <link rel="stylesheet" href="https://maxcdn.boots

我目前是引导模态的初学者。我只是想问为什么外部URL没有出现在模式中

下面是一个关于我尝试做什么的示例:

以下是整个HTML文件:

<!DOCTYPE html>
<html lang="en">
<head>
<title>Example of Bootstrap 3 Modals with Remote URL</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.0/css/bootstrap-combined.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>

<script type="text/javascript" charset="utf-8">
$('a.btn').on('click', function(e) {
    e.preventDefault();
    var url = $(this).attr('href');
    $(".modal-body").html('<iframe width="100%" height="100%" frameborder="0" scrolling="no" allowtransparency="true" src="'+url+'"></iframe>');
});
</script>

<body>
    <a data-toggle="modal" class="btn" href="http://www.bing.com" data-target="#myModal">click me</a>
    <div class="modal hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel">Modal header</h3>
        </div>
        <div class="modal-body">
        </div>
    </div>
</body>
</html>                  

具有远程URL的Bootstrap 3模式示例
$('a.btn')。在('click',函数(e){
e、 预防默认值();
var url=$(this.attr('href');
$(“.modal body”).html(“”);
});
×
模态头

代码来自于。我只是复制、粘贴并探索它。有人知道代码出了什么问题吗?或者我错过了什么?非常感谢您的回复。:)

有什么问题吗?Bing实际上显示在模式中。我不确定你的要求是什么-你想复制滚动吗?将
scrolling=“no”
更改为
scrolling=“yes”
-是否要在屏幕广播中重现滚动错误?(这取决于iframe中的站点)我不知道,但是当我创建html文件,然后在JSFIDLE中复制代码时,模式没有出现。只出现了褪色。有什么问题吗?Bing实际上显示在模式中。我不确定你的要求是什么-你想复制滚动吗?将
scrolling=“no”
更改为
scrolling=“yes”
-是否要在屏幕广播中重现滚动错误?(这取决于iframe中的站点)我不知道,但是当我创建html文件,然后在JSFIDLE中复制代码时,模式没有出现。只出现了一种淡色。