Hello Reader if you looking for any script that makes user a notification whenever he cut, copy of paste data from your website then you can see how it is done below:-
This is the html page
<body>
<h1>jQuery copy, paste and cut example</h1>
<form action="#">
<label>TextBox : </label>
<input id="textA" type="text" size="50"
value="Copy, paste or cut message here" />
</form>
<span></span>
</body>
Now the JS file for the validation will be go like this:-
$("#textA").bind('copy', function() {
$('span').text('copy behaviour detected!')
});
$("#textA").bind('paste', function() {
$('span').text('paste behaviour detected!')
});
$("#textA").bind('cut', function() {
$('span').text('cut behaviour detected!')
});
$(document).ready(function() {
$("#textA").bind({
copy : function(){
$('span').text('copy behaviour detected!');
},
paste : function(){
$('span').text('paste behaviour detected!');
},
cut : function(){
$('span').text('cut behaviour detected!');
}
});
});
The css file:-
span{
color:blue;
}
0 Comment(s)