Monday, May 21, 2007

Restrict User From Ctrl Key Press

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Restrict Ctrl Key Press</title>
<script>
function Restrict()
{
if((window.event.keyCode ==17))
{
alert("Ctrl Key Press In !"+'\r\n'+ "Add Your Own Code Here"); // Add Your Code Here

}
}
</script>
</head>
<body onload="JavaScript:document.body.focus();" onkeydown="Restrict()">
</body>
</html>


(IE Supported)

No comments: