日期:2014-05-16  浏览次数:20406 次

如何知道键盘按了F5刷新窗口
如题,有谁知道啊。

------解决方案--------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">

<html>
<head>
<meta http-equiv= "pragma " content= "no-cache ">
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<title> 新建网页 </title>
<style type= "text/css ">
body{

}
</style>
</head>
<body>
<script language= "javascript ">
document.onkeydown = function(){
if (116==event.keyCode){
alert( "按F5刷新 ")
}
}
</script>
</body>
</html>