Join WhatsApp ChannelJoin Now

Disable Ctrl+U In Javascript

Hi,

Today, i we will show you disable Ctrl+U in javascript. This article will give you simple example of disable Ctrl+U in javascript. you will learn disable Ctrl+U in javascript. So let’s follow few step to create example of disable Ctrl+U in javascript.

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE html>
<html>
<head>
  <title>Disable Ctrl+U In Javascript</title>
</head>
<body>
     
<h1>Disable Ctrl+U In Javascript</h1>
 
 
<script type="text/javascript" > $(function () { $(this).bind("contextmenu", function (e) { e.preventDefault(); }); }); </script>
<script>
    document.onkeydown = function(e) {
    if (e.ctrlKey &&
        (e.keyCode === 85 )) {
        return false;
    }
};
</script>
     
</body>
</html>

Recommended Posts