Comment detail

出力の一時停止と再開 (Nested Flatten)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<script src="jquery-1.2.6.js"></script><script>
$(function(){
  var stdout = $(document.body);
  var pause  = false
  var loop   = setInterval(function(){ pause || stdout.append('a') }, 1000);
  $().bind('keydown', function(e){ e = String.fromCharCode(e.keyCode);
    'P' == e ? pause = !pause :
    'Q' == e ? clearInterval(loop) : 0;
  });
})
</script>

Index

Feed

Other

Link

Pathtraq

loading...