Without using iframes, is it possible to load the contents of

不使用iframe,是否有可能装入

<div id="siteloader"></div>

With an external site e.g. somesitehere.com

有一个外部网站,例如somesitehere.com

When the page loads? - I know how to load contents from a file, but wasn't sure how to load a whole site?

当页面加载?-我知道如何从文件中加载内容,但不知道如何加载整个站点?

Many thanks,

非常感谢,

4 个解决方案

#1


47

This is possible to do without an iframe specifically. jQuery is utilised since it's mentioned in the title.

这可以在没有iframe的情况下实现。由于标题中提到了jQuery,所以使用了jQuery。

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Load remote content into object element</title>
  </head>
  <body>
    <div id="siteloader"></div>​
    <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script>
      $("#siteloader").html('<object data="http://tired.com/">');
    </script>
  </body>
</html>

更多相关文章

  1. [置顶] JQuery datatables 使用Fixedcolumns固定列控件
  2. 点击JSON数据加载Galleria画廊。我需要新鲜的眼睛来看我的错误
  3. 在执行ajax时显示加载图像
  4. jQuery实例(ajax通信和动态加载二级菜单)
  5. 当AJAX响应来自PHP文件时,如何显示以消息为中心的加载器图像&防止
  6. 通过jQuery设置全局Ajax加载时呈现Loading
  7. jQuery Ui Draggable在移动端浏览器不起作用解决方案
  8. 加载函数加载页面但不能对数据执行任何操作
  9. jquery lazyload延迟加载技术的实现原理分析

随机推荐

  1. Android工具HierarchyViewer 代码导读
  2. Android流量抓包工具--PacketCapture
  3. 开发Android第三步,签名证书,真机安装编译
  4. Mac下配置Android(安卓)Stuido的HTTP Pro
  5. Android(安卓)WebView优化
  6. Android(安卓)Studio App设置Activity背
  7. 如何在Eclipse和Android(安卓)Studio中导
  8. Android(安卓)通知使用权(NotificationLi
  9. Android(安卓)http中文乱码问题
  10. Android(安卓)网络编程 API笔记 - java.n