It’s a short article with just one thing that let you know How to disable pasting something on a textbox. You may already see that some websites don’t allow to paste content from clipboard to their textbox in registration forms, especially with email address, phone or password field. They want people have to type/re enter their information carefully before submitting.
In registration forms that require enter email or phone twice (confirm email or phone), I usually using Short key Shift + Tab to go back the previous textbox, Ctrl + C to copy the text, Tab to go back the current textbox then Ctrl + V to paste the content. Those steps save my time. However, sometime I made mistakes by typing wrong information and waste more time to fix.
Anyway, disable pasting on important fields such as email address or phone number (2-ways communication) is useful for both users (who provide information or try to register) and website owners (who collect information) because this avoids providing wrong information and getting wrong information, I think.
When focus on the textbox below, people won’t be able to paste anything. And the magic thing here is just: onpaste=”return false”[html] <input name="txt" type="text" id="txt" onpaste="return false" />