Advertisement
Guest User

Untitled

a guest
Aug 26th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <title>Naga-refresh</title>
  5. </head>
  6.  
  7. <body>
  8. <script>
  9.  
  10. var stop=1;
  11.  
  12. function go(e){
  13.  
  14. if(e==0 || stop==1 ){
  15. frame=document.getElementById("FRAME");
  16. adr=document.getElementById("adr");
  17. frame.src=adr.value;
  18. frame.reload;
  19. }
  20. }
  21.  
  22. function refresh(){
  23. button=document.getElementById("button-refresh");
  24. if(stop==1){
  25. stop=0;
  26. button.innerHTML="Start refresh";
  27. return;
  28. }
  29. if(stop==0){
  30. stop=1;
  31. button.innerHTML="Stop refresh";
  32. }
  33. }
  34.  
  35.  
  36. window.setInterval("go(1);", 10000);
  37.  
  38. </script>
  39.  
  40. site : <input id="adr" value="https://naga.com/user-profile/285090/feed" size="100%" /> <button onclick="go(0)" >Go</button><button id="button-refresh" onclick="refresh()">Stop refresh</button>
  41.  
  42. <iframe id="FRAME" src="https://naga.com/user-profile/285090/feed" height="100%" width="100%">
  43. </body>
  44. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement