Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/467.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
Javascript 使用按钮单击打开的jQuery ui模式未加载网页_Javascript_Jquery_Html - Fatal编程技术网

Javascript 使用按钮单击打开的jQuery ui模式未加载网页

Javascript 使用按钮单击打开的jQuery ui模式未加载网页,javascript,jquery,html,Javascript,Jquery,Html,我需要在模式对话中显示网页。此弹出窗口应仅在单击按钮后出现,其中按钮具有url路径。我已经想出了以下代码,但它显示了一个空白的模式窗口。你能告诉我这里可能缺少什么吗。多谢各位 <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>jQuery UI Dialog - Default functionality</title>

我需要在模式对话中显示网页。此弹出窗口应仅在单击按钮后出现,其中按钮具有url路径。我已经想出了以下代码,但它显示了一个空白的模式窗口。你能告诉我这里可能缺少什么吗。多谢各位

   <!doctype html>
<html lang="en">
<head>  <meta charset="utf-8">  
<title>jQuery UI Dialog - Default functionality</title>  
<link rel="stylesheet" href="jquery-ui.css">  
<script src="jquery-1.10.2.js"></script>  
<script src="jquery-ui.js"></script>  
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.3/jquery-ui.min.js"></script>
<link rel="stylesheet" href="style.css">  
<script type="text/javascript">  
$(function() { 
    $('#clickMe').click(function(event) {
        var link = this;

    $('<div>').dialog({
            modal: true,
            open: function ()
            {

                    $(this).load($(link).attr("href"));

        },         
            height: 400,
            width: 400,
            title: 'This is popup window',
            show: 'puff',
        hide: 'puff'
        });
    });
});
 </script>
</head>
<body>
      <button id="clickMe" href="http://www.google.com/">Google</button>

</body>
</html> 

jQuery UI对话框-默认功能
$(函数(){
$('#clickMe')。单击(函数(事件){
var-link=这个;
$('')。对话框({
莫代尔:是的,
打开:函数()
{
$(this.load($(link.attr(“href”));
},         
身高:400,
宽度:400,
标题:“这是弹出窗口”,
表演:“泡芙”,
隐藏:“喘息”
});
});
});
谷歌

$(函数(){
$('#clickMe')。单击(函数(事件){
var-link=这个;
$('')。对话框({
莫代尔:是的,
打开:函数(){
console.log('link',link);
log('link.href应为未定义',link.href);
log('$(link.attr(“href”)应该为您获取值',$(link.attr(“href”);
$(this.load($(link.attr(“href”));
},
身高:400,
宽度:400,
标题:“这是弹出窗口”
});
});
});
谷歌

雅虎同样,空白模式只在谷歌按钮的点击下打开。当我点击雅虎按钮时,没有模式出现。谢谢,更正了。但点击谷歌,我不知道为什么会出现一个空白窗口。你能帮我一下吗?嗨,有什么需要帮忙的吗。我仍然停留在这个代码是好的,你将只面对跨来源的问题,为你的回应。请问有什么办法可以解决跨境问题吗?