fork download
  1. var text = "";
  2. func();
  3.  
  4. function func() {
  5. var xhr = new XMLHttpRequest();
  6. xhr.onreadystatechange = function() {
  7. if (xhr.readyState === 4) {
  8. text += xhr.responseText;
  9. if (false) {
  10. //
  11. } else {
  12. document.body.appendChild(document.createTextNode(text));
  13. }
  14. }
  15. };
  16. xhr.open("GET", location.href, true);
  17. xhr.setRequestHeader("Range", "byte=100-199");
  18. xhr.send();
  19. }
Runtime error #stdin #stdout 0.29s 213248KB
stdin
Standard input is empty
stdout
Standard output is empty