<small id='SoyWR'></small><noframes id='SoyWR'>

    <legend id='SoyWR'><style id='SoyWR'><dir id='SoyWR'><q id='SoyWR'></q></dir></style></legend>
    • <bdo id='SoyWR'></bdo><ul id='SoyWR'></ul>

  1. <tfoot id='SoyWR'></tfoot>
  2. <i id='SoyWR'><tr id='SoyWR'><dt id='SoyWR'><q id='SoyWR'><span id='SoyWR'><b id='SoyWR'><form id='SoyWR'><ins id='SoyWR'></ins><ul id='SoyWR'></ul><sub id='SoyWR'></sub></form><legend id='SoyWR'></legend><bdo id='SoyWR'><pre id='SoyWR'><center id='SoyWR'></center></pre></bdo></b><th id='SoyWR'></th></span></q></dt></tr></i><div id='SoyWR'><tfoot id='SoyWR'></tfoot><dl id='SoyWR'><fieldset id='SoyWR'></fieldset></dl></div>

      页面加载后显示弹出窗口

      Show popup after page load(页面加载后显示弹出窗口)

        <i id='tyMDQ'><tr id='tyMDQ'><dt id='tyMDQ'><q id='tyMDQ'><span id='tyMDQ'><b id='tyMDQ'><form id='tyMDQ'><ins id='tyMDQ'></ins><ul id='tyMDQ'></ul><sub id='tyMDQ'></sub></form><legend id='tyMDQ'></legend><bdo id='tyMDQ'><pre id='tyMDQ'><center id='tyMDQ'></center></pre></bdo></b><th id='tyMDQ'></th></span></q></dt></tr></i><div id='tyMDQ'><tfoot id='tyMDQ'></tfoot><dl id='tyMDQ'><fieldset id='tyMDQ'></fieldset></dl></div>

            <tfoot id='tyMDQ'></tfoot><legend id='tyMDQ'><style id='tyMDQ'><dir id='tyMDQ'><q id='tyMDQ'></q></dir></style></legend>

            <small id='tyMDQ'></small><noframes id='tyMDQ'>

            • <bdo id='tyMDQ'></bdo><ul id='tyMDQ'></ul>

                  <tbody id='tyMDQ'></tbody>
              • 本文介绍了页面加载后显示弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我按照在线教程创建了一个 jQuery 弹出窗口.

                I created a jQuery popup by following an online tutorial.

                我想在页面加载后/页面加载后显示此弹出窗口+如何将其编码为在页面加载 5 秒后显示.

                I want to show this popup after page load/after page load it appears + how to code it as like it appears after 5 second of page load.

                由于我对 jQuery 的了解不足,我无法使其按我的要求工作.

                Due to my low knowledge on jQuery I am not able to make it work as of my requirements.

                知道怎么做吗?

                function PopUp(){
                    document.getElementById('ac-wrapper').style.display="none"; 
                }

                #ac-wrapper {
                    position: fixed;
                    top: 0;
                    left: 0;
                    width: 100%;
                    height: 100%;
                    background: rgba(255,255,255,.6);
                    z-index: 1001;
                }
                
                #popup {
                    width: 555px;
                    height: 375px;
                    background: #FFFFFF;
                    border: 5px solid #000;
                    border-radius: 25px;
                    -moz-border-radius: 25px;
                    -webkit-border-radius: 25px;
                    box-shadow: #64686e 0px 0px 3px 3px;
                    -moz-box-shadow: #64686e 0px 0px 3px 3px;
                    -webkit-box-shadow: #64686e 0px 0px 3px 3px;
                    position: relative;
                    top: 150px; left: 375px;
                }

                <div id="ac-wrapper">
                    <div id="popup">
                        <center>
                            <h2>Popup Content Here</h2>
                            <input type="submit" name="submit" value="Submit" onClick="PopUp()" />
                        </center>
                    </div>
                </div>
                
                <p>Page Content Here......</p>

                推荐答案

                当 DOM 完成加载后,您可以在 $(document).ready() 函数中添加代码.

                When the DOM is finished loading you can add your code in the $(document).ready() function.

                从这里移除 onclick:

                Remove the onclick from here:

                <input type="submit" name="submit" value="Submit" onClick="PopUp()" />
                

                试试这个:

                $(document).ready(function(){
                   setTimeout(function(){
                      PopUp();
                   },5000); // 5000 to load it after 5 seconds from page load
                });
                

                这篇关于页面加载后显示弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Fetch multiple links inside foreach loop(在 foreach 循环中获取多个链接)
                Backbone Fetch Request is OPTIONS method(Backbone Fetch Request 是 OPTIONS 方法)
                Fetch API leaks memory in Chrome(Fetch API 在 Chrome 中泄漏内存)
                How can I download and save a file using the Fetch API? (Node.js)(如何使用 Fetch API 下载和保存文件?(Node.js))
                Send blob data to node using fetch, multer, express(使用 fetch、multer、express 将 blob 数据发送到节点)
                Sending a custom User-Agent string along with my headers (fetch)(发送自定义用户代理字符串以及我的标头(获取))

                  • <bdo id='ruRdi'></bdo><ul id='ruRdi'></ul>
                    1. <small id='ruRdi'></small><noframes id='ruRdi'>

                    2. <i id='ruRdi'><tr id='ruRdi'><dt id='ruRdi'><q id='ruRdi'><span id='ruRdi'><b id='ruRdi'><form id='ruRdi'><ins id='ruRdi'></ins><ul id='ruRdi'></ul><sub id='ruRdi'></sub></form><legend id='ruRdi'></legend><bdo id='ruRdi'><pre id='ruRdi'><center id='ruRdi'></center></pre></bdo></b><th id='ruRdi'></th></span></q></dt></tr></i><div id='ruRdi'><tfoot id='ruRdi'></tfoot><dl id='ruRdi'><fieldset id='ruRdi'></fieldset></dl></div>

                          <tfoot id='ruRdi'></tfoot>
                        • <legend id='ruRdi'><style id='ruRdi'><dir id='ruRdi'><q id='ruRdi'></q></dir></style></legend>

                            <tbody id='ruRdi'></tbody>