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

时间:2014-06-19 10:35:49

标签: jquery html dialog external

我可以在对话框中显示整个外部网址,但我想要的是显示来自外部网址的特定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>

0 个答案:

没有答案