【问题标题】:jQuery mobile stops working with iFrame in the same page - PhonegapjQuery mobile 停止在同一页面中使用 iFrame - Phonegap
【发布时间】:2018-12-02 18:31:30
【问题描述】:

这是我的 Phonegap 代码:

<html>
    <head>      
        <meta name="format-detection" content="telephone=no">
        <meta name="msapplication-tap-highlight" content="no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
        <link rel="stylesheet" type="text/css" href="css/index.css">
        <title>Hello World</title>
        <style type="text/css">
             #footer{
                position: absolute;
                bottom: 0;
                width: 100%;
            }
        </style>
    </head>
    <body style="margin: 0px;">
        <!--<h1>Apache Cordova</h1>
        <p id="registration"></p>
        <ul id="pushList"></ul>-->
        <div data-role="page">
            <div data-role="header">
            <h1>Page Title</h1>
        </div><!-- /header -->

        <div role="main" class="ui-content">
            <iframe src="https://geckoadv.netsons.org/" style=" margin:0px; padding: 0px; border: 0px;" > 
        </div><!-- /content -->

        <div data-role="footer">
            <h4>Page Footer</h4>
        </div><!-- /footer -->

        </div><!-- /page -->

        <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
        <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>
    </body>
</html>

当我在页面中添加iFrame 时,jQuery Mobile 停止工作并且页脚没有显示。
如果我删除 iFrame 一切正常。

有什么想法或建议吗?

【问题讨论】:

  • 我在控制台中收到此错误:“[Violation] 执行 JavaScript 时强制重排耗时 57 毫秒”

标签: jquery html cordova jquery-mobile phonegap


【解决方案1】:

我没有用 &lt;/iframe&gt; 关闭 iFrame 标记

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-22
    • 2014-01-09
    • 1970-01-01
    • 2012-11-29
    相关资源
    最近更新 更多