繁体   English   中英

DIV:完全呈现的指标事件

[英]DIV: Completely rendered indicator event

div完全呈现时,我需要调用一个javascript函数。 但是,我不知道要使用的正确事件。

感谢您的帮助。

您可以在调用函数或执行的文档中内嵌脚本。 只需将其逻辑地放在应该呈现的位置。

<html>
    <body>
        <div><h1>Wait for it!</h1></div>
        <script type="text/javascript">
            document.write("<h2>Js process</h2>");
            alert("Stopping document process");
        </script>
        <div><h3>Done!</h3></div>
    </body>
</html>

没有事件,只需创建一个回调函数,在html编写完成后,调用你的回调例程。

function x ( html, callback) {
     divElement.innerHTML = html;
     callback();
}

我想你需要这样的东西:

<!-- This is the Div to be rendered: -->
<div> 

 <script>
         /* This script is executed when all div is rendered!!*/

 </script>

</div>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM