Friday, September 23, 2011

Prevent Cut, Copy and Paste Operations in textbox using jquery

<script type="text/javascript">
        $(function() {
        $('input[id$=tb1]').bind('cut copy paste', function(e) {
                e.preventDefault();
                alert('You cannot ' + e.type + ' text!');
            });
        });
    </script>

No comments:

Post a Comment