加载整个页面后运行javascript [英] To run javascript after the entire page is loaded

查看:84
本文介绍了加载整个页面后运行javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经为firefox创建了扩展.但是在检查时,我已经确认Mozilla扩展代码在页面加载完成之前正在执行.我的javascript文件不能包含任何html标记,因此我无法使用method.目前,我正在使用window.addEventListener("load",function(e){function.onLoad(e);},false)方法.但是这种方法是在页面加载完成之前执行javascript.我想在页面加载完成之后运行扩展程序.

任何人都可以建议我一个可以在整个页面完成加载后调用的javascript函数吗?

Hi all,

I have created an extension for firefox. But while checking I have confirmed that the Mozilla extension code is executing before the page load is complete. My javascript file cannot contain any html tags, so I cannot use method. Currently I am using window.addEventListener("load", function (e) { function.onLoad(e); }, false) method. But this method is executing the javascript before the page load is complete.I want to run my extension after page load is complete.

Can anyone suggest me a javascript function that I can invoke after the entire page has completed loading ?

推荐答案

您可以不使用

这篇关于加载整个页面后运行javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆