Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/74.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.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
html将特定div从外部url加载到jquery对话框中_Jquery_Html_Dialog_External - Fatal编程技术网

html将特定div从外部url加载到jquery对话框中

html将特定div从外部url加载到jquery对话框中,jquery,html,dialog,external,Jquery,Html,Dialog,External,我可以在对话框中显示整个外部url,但我希望显示外部url的特定div中的内容。有什么建议吗 这就是我所做的 <!DOCTYPE html> <html> <head> <style> body{ font-size: 12px; font-family: Arial; } </style> <script src="http://code.jquery.com/jquery-latest.js"></

我可以在对话框中显示整个外部url,但我希望显示外部url的特定div中的内容。有什么建议吗

这就是我所做的

<!DOCTYPE html>
<html>
<head>
  <style>
  body{ font-size: 12px; font-family: Arial; }
  </style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css">
</head>
<body>


<button id="dialog_trigger">Open The Dialog</button>

<div id="dialog" style="display:none;" title="Dialog Title">
<iframe frameborder="0" scrolling="no" width="700" height="700" src="someblogurl">
</iframe>
</div>

  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script>
<script>
$( "#dialog_trigger" ).click(function() {
$( "#dialog" ).dialog( "open" );
});
$("#dialog").dialog({
    autoOpen: false,
    position: 'center' ,
    title: 'Listing Table',
    draggable: false,
    width : 500,
    height : 500,
    resizable : true,
    modal : true,
});


  </script>

</body>
</html>

可能重复感谢iframe的作品!但是,如果外部url的内容有任何更改,则iframe属性也必须相应更改。。有更好的方法吗?我曾尝试使用jquery加载页面片段,但无法工作。