23/03/2011
Close Tab Using ESC
<html>
<head>
<script>
function checkForEsc(e)
{
if(!e)
e = window.event;
var key = e.keyCode;
if(key==27)
doCancel();
}
function doCancel()
{
window.parent.close();
}
</script>
</head>
<BODY onkeypress=checkForEsc(event);>
</body>
</html>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment