Disable copy command on web page using JavaScript

Last Reply on May 09, 2012 04:35 AM By Amit

Posted on May 09, 2012 04:19 AM

I hv a page datatable.aspx which contain's some imp data and i don't want user copy that data by using ctrl+V .

I disable right click using java script bt ctrl+V allow them to copy that data.......

Any help........

Posted on May 09, 2012 04:25 AM

There is no fool proof way to do this as you cannot stop anyone from copying.

Still you can make ti difficult by disabling ctrl key

<body onkeypress = "return event.keyCode != 17">


Posted on May 09, 2012 04:35 AM

thanks mudassar but i use

<body oncopy="return false">

and it is working fine................