Showing posts with label jsp. Show all posts
Showing posts with label jsp. Show all posts
August 15, 2013
August 9, 2013
Disable Ctrl+C ,Ctrl+V ,Ctrl+A in a web page : Javascript
Question How to disable Ctrl+C , Ctrl+V , Ctrl+A in any web page by using javascript.
More..
Disable Button after clicking on it.
Solution:
just copy and paste below script in <head> section
and call the function in html body

Disable Button after clicking on it.
Solution:
just copy and paste below script in <head> section
<script type="text/javascript">
function Disable_Control_C() {
var keystroke = String.fromCharCode(event.keyCode).toLowerCase();
if (event.ctrlKey && (keystroke == 'c' || keystroke == 'v' || keystroke == 'a')) {
alert("This function not allowed");
event.returnValue = false; // disable Ctrl+C
}
}
</script>
and call the function in html body
<body onkeydown="javascript:Disable_Control_C()">
Hello World!
</body>
</html>
Subscribe to:
Posts (Atom)