Advertisement
Vladimir3261

Untitled

Jun 19th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. var rng = document.querySelector("input");
  3.  
  4. read("mousedown");
  5. read("mousemove");
  6.  
  7. function read(evtType) {
  8.   rng.addEventListener(evtType, function() {
  9.     window.requestAnimationFrame(function () {
  10.       document.querySelector("div").innerHTML = rng.value;
  11.     });
  12.   });
  13. }
  14. </script>
  15. <div>50</div><input type="range"/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement