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 AutoCompleteTextView 实现输入
  2. Android中隐藏ActionBar的方法
  3. Android获取手机方向
  4. android带图片的AlertDialog和文件管理器
  5. Android Button 点击时替换背景颜色和替
  6. 做了六年Android,终于熬出头了,15K到31K全
  7. Android屏幕自适应的四种方法
  8. Qt for Android(安卓)拉起微信登录、分享
  9. Android(安卓)API Guides---App Manifest
  10. Android应用优化之内存概念