blog post

There are cases where you don’t want users to view source code in your website. So to do this just add the below piece of javascript code in your website and its done.

Source Code

/* Ctrl+U Disable  start*/
	document.onkeydown = function (cc) {
	if(cc.which == 85){
		alert("Ctrl+U Disable.");
	return false;
	}
		}
/* Ctrl+U Disable end */

  • Share This Story


Pleas give your valuable comments to improve the contents.

about author

Atul kumar shukla


I'm Atul Kumar Shukla, working as a web developer.
Welcome to my Blog. This is my personal blog where i post my own questions and answers , articles about ASP.Net., SQL Server, HTML, CSS, Jquery and many more..

Visit Profile

Leave a comment

Name
E-mail
Url
Message

Get More Stuff
Subscribing to the TheOneblogs newsletter and get intersting stuff and updates to your email inbox.
Your Email

 

Style Switcher

Change Color

×! We use cookies to improve your user experience. More information