How can i stop viewing source code when press Ctrl+U
i have a script which detects when ctrl or U is being pressed, but then
its shows the source code..
how can i disable the vieewing of source code
$(document).ready(function()
{
var ctrlDown = false;
var ctrlKey = 17, vKey = 86, cKey = 67, uKey = 85;
$(document).keydown(function(e)
{
if(e.ctrlKey || e.keyCode == 85)
{
alert("I've been pressed!");
e.preventDefault();
}
if(e.keyCode == 116)
{
e.preventDefault();
}
});
}
);
No comments:
Post a Comment