【问题标题】:How to direct user to new page after edge script completes边缘脚本完成后如何将用户引导到新页面
【发布时间】:2015-03-12 06:29:49
【问题描述】:

当用户访问此页面时,我正在运行 adobe edge 动画脚本,我希望页面在边缘脚本完成后自动将用户重定向到新页面 (first.html)。如果我使用 window.location.href,无论我把它放在哪里,当页面加载时,边缘脚本都不会运行,它只会将我引导到新页面。我应该使用不同的功能吗? setTimeout 也许?也无法让它工作。

    <script type="text/javascript" charset="utf-8" src="index_edgePreload.js"></script>
    <style>
    .edgeLoad-EDGE-132380638 { visibility: hidden; }
    </style>
    <!--Adobe Edge Runtime End-->

    </head>
    <body style="margin:0;padding:0;">
    <div id="Stage" class="EDGE-132380638"> </div>
    </body>
    <script>window.location.href = "first.html";
        </script>
    </html>

【问题讨论】:

    标签: javascript adobe-edge


    【解决方案1】:

    setTimeout 有效:

        <script>
        setTimeout(function(){
            window.location.href = "first.html";
        }, 4000);
            </script>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-06-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-15
      • 1970-01-01
      相关资源
      最近更新 更多