How can I capture the F5/Refresh key?
Created Sep 30, 2001
Sivasubramanian Shanmuga Sundaram Use the following code.
shanmyselva
<head>
<script language="javascript">
///for IE
function test()
{
if(event.keyCode == 116)
{
///do anything
}
}
///for Netscape
window.captureEvents(Event.KEYUP);
window.onKeyup = test;
function test(event)
{
if(event.keyCode == 116)
{
///do anything
}
}
</script>
<body onkeyup="test()">
</body>
regards,shanmyselva