How To Prevent Cut, Copy and Paste for Textbox in HTML

on Tuesday, July 15, 2014
For this simply you have to add below code:

for preventing copy:
oncopy="return false"

example:
<input type="textbox" name="password" id="password" oncopy="return false" />

for preventing cut:
oncut="return false"

example:
<input type="textbox" name="password" id="password" oncut="return false" />

for preventing paste:
onpaste="return false"

example:
<input type="textbox" name="password" id="password" onpaste="return false" />

0 comments:

Post a Comment