JSFiddle - React, Tailwind, and code Playground
by abdennour
HTML
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<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>
CSS
span{
color:blue;
}
JavaScript
$("#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!');
}
});
});