Amigos,
estou precisando bloquear as teclas ctrl e alt na minha pagina aspx. já tentei com dicas de outros threads mas não consegui, estou fazendo assim
<
HTML>
<HEAD>
<LINK href="Styles.css" type="text/css" rel="stylesheet">
<script language="javascript" type="text/javascript">
function SetaValor1()
{
document.Form1.txtRespEsc.value=1;
}
function SetaValor2()
{
document.Form1.txtRespEsc.value=2;
}
function SetaValor3()
{
document.Form1.txtRespEsc.value=3;
}
function SetaValor4()
{
document.Form1.txtRespEsc.value=4;
}
function SetaValor5()
{
document.Form1.txtRespEsc.value=5;
}
function Verificar()
{
var ctrl=window.event.ctrlKey;
var alt =window.event.altKey;
var tecla=window.event.keyCode;
if (ctrl && tecla==17) {alert('CTRL'); event.keyCode=0; event.returnValue=false;}
if (alt && tecla==18) {alert('ALT'); event.keyCode=0; event.returnValue=false;}
}
function Bloqueia() {
window.document.body.onkeydown=Muda;
window.document.body.onkeypress=Muda;
}
function Muda() {
window.location=
'negado.htm';
}
</script>
</HEAD>
<body onload="Bloqueia;">
<form onkeydown="Muda;" id="Form1" method="post" runat="server">