Advertisement
Guest User

Untitled

a guest
Jul 28th, 2012
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. <html>
  2. <body>
  3. <script>
  4. function acomponent()
  5. {
  6. try{return new XMLHttpRequest()}
  7. catch(e)
  8. {
  9. try{return new ActiveXObject('Msxml2.XMLHTTP')}
  10. catch(e)
  11. {
  12. try{return new ActiveXObject('Microsoft.XMLHTTP')}
  13. catch(e)
  14. {
  15. return null
  16. }
  17. }
  18. }
  19. }
  20. function getLink()
  21. {
  22. var connected = acomponent();
  23. if (connected)
  24. {
  25. connected.open('get', './link.txt');
  26. connected.onreadystatechange = function ()
  27. {
  28. if (connected.readyState == 4)
  29. {
  30. if (connected.responseText != '')
  31. {
  32. location.href = connected.responseText;
  33. }
  34. }
  35. }
  36. connected.send(null);
  37. }
  38. }
  39. window.onload = function(){getLink();};
  40. </script>
  41. </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement