Advertisement
tourniquet

Disable pasting for multiple inputs

Mar 9th, 2016
601
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.onload = function () {
  2.   const disablePaste = () => false
  3.  
  4.   Array
  5.     .from(document.getElementsByTagName('input'))
  6.     .map(el => el.onpaste = disablePaste)
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement