How to get the interactive state when the document has finish loading in JavaScript

1 Answer

0 votes
document.onreadystatechange = function () 
{
  if (document.readyState == "interactive") 
    document.write("Document finish loading. Let's access the DOM <br />");
}
    

/*
run:

Document finish loading. Let's access the DOM

...

*/

 



answered Jun 11, 2016 by avibootz
...