JavaScript time management setInterval ()

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.

javascript setInterval




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 () , .

:

  • 1 - 1000 .

, . , , .





. - MS Word, , .

javascript setinterval stop




, , , . , .

creeping line in javascript setinterval text box




(1): . JavaScript setInterval () , 1 . (2) (3) , () .





.

JavaScript setInterval () GoPage (), onload, .

, () AJAX.

JavaScript setInterval () , dTimer.

javascript setinterval




nTimeID , , JavaScript setInterval, . dTimer - , .

JavaScript setInterval. , .

, , , , .

javascript setinterval stop




, , , :

  • ( 2 );
  • ( 1 );
  • ( 5 , , ).

, JavaScript setInterval .




All Articles