<html>
<head>
<script>
function getKeyDown(){
if(window.event && window.event.keyCode == 0)
{
window.event.keyCode = 000;
event.returnValue = false;
alert("F1 pressed!")
return false;
}
if(window.event && window.event.keyCode == 113)
{
window.event.keyCode = 000;
alert("F2 pressed!")
return false;
}
if(window.event && window.event.keyCode == 114)
{
window.event.keyCode = 000;
alert("F3 pressed!")
return false;
}
}
document.onkeydown = getKeyDown;
document.onhelp = getKeyDown;
</script>
</head>
<body>
<br>
Press F1, F2 or F3 to test
</body>
</html>
<head>
<script>
function getKeyDown(){
if(window.event && window.event.keyCode == 0)
{
window.event.keyCode = 000;
event.returnValue = false;
alert("F1 pressed!")
return false;
}
if(window.event && window.event.keyCode == 113)
{
window.event.keyCode = 000;
alert("F2 pressed!")
return false;
}
if(window.event && window.event.keyCode == 114)
{
window.event.keyCode = 000;
alert("F3 pressed!")
return false;
}
}
document.onkeydown = getKeyDown;
document.onhelp = getKeyDown;
</script>
</head>
<body>
<br>
Press F1, F2 or F3 to test
</body>
</html>