168
rated 0 times
[
174]
[
6]
/ answers: 1 / hits: 128591
/ 12 Years ago, tue, october 9, 2012, 12:00:00
Html FIle Disable drop paste in HTML input fields..
More From » html
Html FIle Disable drop paste in HTML input fields..
You can disable paste in your input as follows:
html:
<input type="text" value="" id="myInput">
javascript:
window.onload = () => {
const myInput = document.getElementById('myInput');
myInput.onpaste = e => e.preventDefault();
}
Talking about security, I wouldn't say that this makes any impact. You would usually use client side and well as server-side validation of data submitted by the user.