Question : disable key access F11 in IE

i try to find a method to hide the F11 key in ie.


tried the code below but not quite,
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
<SCRIPT LANGUAGE="JavaScript"> 

function onKeyDown() {
if ( (event.altKey) || ((event.keyCode == 8) && 
(event.srcElement.type != "text" &&
event.srcElement.type != "textarea" &&
event.srcElement.type != "password")) || 
((event.ctrlKey) && ((event.keyCode == 82)) ) ||
(event.keyCode == 122) ) {
event.keyCode = 0;
event.returnValue = false;
}
}


</script>
<body onkeydown=onKeyDown()>

</SCRIPT>

Answer : disable key access F11 in IE

try this too :

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
<SCRIPT LANGUAGE="JavaScript"> 
function checkKey(e) {
	var alt =  e.altKey;
	var key = e.keyCode;
	var type = e.srcElement.type;
	ctrl = event.ctrlKey
	if ( alt || ((key == 8)&&(type != "text" && type != "textarea" && type != "password")) || (ctrl&&(key == 82)) || (key == 122) ) {
		event.keyCode = 0;
		event.returnValue = false;
                return false;
	}
        return true;
}
</SCRIPT>
<body onkeydown="return checkKey(event)">
Random Solutions  
 
programming4us programming4us