RSS

Disable HTML Right-click, Copy & Paste using Javascript

02 Jul

//below javascript is used for Disabling right-click on HTML page
document.oncontextmenu=new Function(“return false”);//Disabling right-click

//below javascript is used for Disabling text selection in web page
document.onselectstart=new Function (“return false”); //Disabling text selection in web page
if (window.sidebar){
document.onmousedown=new Function(“return false”);
document.onclick=new Function(“return true”) ;

//Disable Cut into HTML form using Javascript
document.oncut=new Function(“return false”);

//Disable Copy into HTML form using Javascript
document.oncopy=new Function(“return false”);

//Disable Paste into HTML form using Javascript
document.onpaste=new Function(“return false”);
}

http://teqsnacks.com/2014/01/27/disable-html-copy-paste-javascript/
http://www.ondeweb.in/disable-right-click-and-copy-paste-using-javascript/

Advertisements
 
Leave a comment

Posted by on July 2, 2015 in Javascript

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: