Javascript replace content and refresh it with new content which new content from outerHTML -


is possible refresh page new content new content outerhtml? i'm having problem want refresh page until 2 seconds, proccess 0-2 seconds new html innerhtml , etc. after new content outerhtml. difficulty refresh content html outerhtml.

below example code:

<script>     // code blablabla new content. has been fix code, , below code start refresh page outerhtml.     window.onload = function() {         tes();     };      function tes() {         var htmlall = document.documentelement.outerhtml;         settimeout(function(){howcoderefresh()}, 2000);         function howcoderefresh() {             // how code refresh page , replace content variable htmlall         };     }; </script> 

my question: possible it? if yes, how it?

thanks.

you not explain question,you can try ajax in jquery solve question.here basic demo:

    <div id = "target"></div>       <script type="text/javascript" src="jquery.js"></script>     <script type="text/javascript">         window.onload = loadhtml;         function loadhtml(){              $.get("your/server/page.html",function(response){                    $("#target").html(response);     //here html response              },'html');          }     </script> 

here more document jquery ajax.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -