The development of Internet technologies has led to the fact that the page is fully loaded only when the visitor arrives or the client logs into the web resource. Further work is done in an AJAX or similar environment.
All browsers allow the onload event, which occurs after the page is loaded into the browser and all DOM objects take their places in it. Appointing a handler for this event is the right decision, and starting a web resource timer in it is the natural beginning of work with a visitor or client.
Syntax and meaning of setInterval () function
The setInterval () JavaScript function has only two parameters: the code and the time after which this code needs to be re-executed. The result of the function is a unique number, referring to which you can stop the execution of the function using clearInterval ().
, , , JavaScript setInterval () , .
:
, . , , .
. - MS Word, , .
, , , . , .
(1): . JavaScript setInterval () , 1 . (2) (3) , () .
.
JavaScript setInterval () GoPage (), onload, .
, () AJAX.
JavaScript setInterval () , dTimer.
nTimeID , , JavaScript setInterval, . dTimer - , .
JavaScript setInterval. , .
, , , , .
, , , :
, JavaScript setInterval .