Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     <input id="display" type="text">
  2.     <button>1</button>
  3.     <button>2</button>
  4.  
  5.     <script>
  6.     var btn = document.querySelectorAll("button");
  7.     btn = Array.from(btn);
  8.  
  9.     btn.forEach(function(b){
  10.       console.log(b.innerHTML);
  11.     });
  12.  
  13.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement