开发者

Set Time out by passing a parameter

开发者 https://www.devze.com 2023-03-06 00:08 出处:网络
i\'m currently have a problem by using the SetTimeOut function. The thing is that i need to use it by passing a parameter, but it didn\'t work...

i'm currently have a problem by using the SetTimeOut function.

The thing is that i need to use it by passing a parameter, but it didn't work... Here is the code :

function RSSChecker(dMObject)
{
    if (dMObject) 
    {
        alert('Refresh');
        window.setTimeout(RSSChec开发者_运维问答ker(dMObject), 10000);
    }
}

Any ideas?


Another approach would be to wrap the inner call in an anonymous function that invokes your function. So that you have:-

window.setTimeout(function() { RSSChecker(dmObject); }, 10000);
0

精彩评论

暂无评论...
验证码 换一张
取 消