阅读背景:

加载页面后延迟后运行JS函数

来源:互联网 

So I am running a very simple function atm that runs on page load. However whilst the page has finished loading, it sometimes takes half a second or so for the content itself to actually pop up. This wouldn't normally be an issue but one of my variables relies on content that is loaded is it possible to run the JS function 2 seconds AFTER the page has been loaded? I know I could just use a timeout but surely if the user is on slow internet and it takes longer than that for the page to load, it will run before it is ready?So I am running a very simple function atm that




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: