Friday, 30 November 2012

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

Thank you so much for providing your valuable feedback. I will will look into them and update my skills & technologies accordingly.