{
if(event.ctrlKey)
{
alert("This Operation Is Not Allowed");
event.keyCode=0;
return false;
}
if ((event.altKey))
{
alert("This Operation Is Not Allowed");
event.keyCode=0;
return false;
}
if (event.keyCode==112)
{
//alert("This Alt Operation Is Not Allowed");
event.keyCode=0;
return false;
}
if(event.keyCode==114 )
{
alert("This Operation Is Not Allowed");
event.keyCode=0;
return false;
}
if(parseInt(event.button)==2)
{
alert("This Operation Is Not Allowed");
return false;
}
if((event.keyCode==116)||(event.keyCode==122)||(event.keyCode==18)||(event.keyCode==93)||(event.keyCode==16))
{
alert("This Operation Is Not Allowed");
event.keyCode=0;
return false;
}
return true;
}
Back to JavaScript Tutorial Page | Back to JavaScript Validations Page |
No comments:
Post a Comment