Ciao,

codice:
<script type="text/javascript">
document.onkeydown = tasto_f5;
function tasto_f5(e){
msg="Tasto [F5] disattivato";
if (document.getElementById&&!document.all){
if (e.which == 116){
alert(msg);
return false;
}
}           
if (document.all){
if(event.keyCode == 116){
alert(msg);
event.keyCode = 0;
return false;
}
}
}			
</script>

Massimo