【问题标题】:Swipe Within and iframe or Something Similar在内部滑动和 iframe 或类似的东西
【发布时间】:2012-08-08 04:54:08
【问题描述】:

嘿嘿,

希望这是一个简单的问题和一个简单的答案... 有没有办法使用 iframe 或类似的东西创建一个 html 文档,它会加载一个网页,但允许您在页面之间来回滑动?像

<html>
<head>
<meta charset="utf-8"/>
<title>Blent</title>
<link rel="stylesheet" href="jquery.mobile.pagination.css" />
<script src="http://code.jquery.com/mobile/1.1.1/jquery.mobile-1.1.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.min.js">      </script>
<script src="jquery.mobile.pagination.js"></script>
<!-- Prevent scaling -->
<meta name="viewport" content="user-scalable=no, width=device-width" />
<!-- Eliminate url and button bars if added to home screen -->
<meta name="apple-mobile-web-app-capable" content="yes" />
</head>
<body>
<iframe id=”the-frame” src=”http://google.com”></iframe>
</body>
</html>

所以我有一个带有 google 的 iFrame,如果我滑动,它会加载 Amazon.com,然后如果我向后滑动,它会加载 Google。有什么办法吗?

【问题讨论】:

    标签: jquery ios ipad jquery-mobile


    【解决方案1】:

    我猜你会冒犯同源政策。因此,您将无法使用 javascript 在 iframe 中执行任何操作(无论是 jquery、mootools、vanilla 还是其他任何东西)。

    可能但是如果您在多个 DIV 中创建多个 IFRAME 并滑动后者...

    【讨论】:

      猜你喜欢
      • 2014-08-30
      • 2011-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-10-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多