Advertisement
BrU32

JS DOM Event Listener SRC

Jan 13th, 2017
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <script>
  2. document.addEventListener('DOMContentLoaded', function() {
  3. document.body.innerHTML=document.body.innerHTML+('DOMContentLoaded\n');
  4. });
  5. document.addEventListener('mousedown', function() {
  6. document.body.innerHTML=document.body.innerHTML+('mousedown\n');
  7. });
  8. document.addEventListener('mouseup', function() {
  9. document.body.innerHTML=document.body.innerHTML+('mouseup\n');
  10. });
  11. document.addEventListener('mousemove', function() {
  12. document.body.innerHTML=document.body.innerHTML+('mousemove\n');
  13. });
  14. document.addEventListener('keydown', function() {
  15. document.body.innerHTML=document.body.innerHTML+('keydown\n');
  16. });
  17. document.addEventListener('keyup', function() {
  18. document.body.innerHTML=document.body.innerHTML+('keyup\n');
  19. });
  20. document.addEventListener('keypress', function() {
  21. document.body.innerHTML=document.body.innerHTML+('keypress\n');
  22. });
  23. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement