Web JS-热键

<script language="">
<!--
var travel=true
var hotkey=99 /* hotkey即为热键的键值,是ASII码,这里99代表c键 */
if (document.layers)
document.captureEvents(Event.KEYPRESS)
function gogo(e)
{ if (document.layers) {
if (e.which==hotkey&&travel) window.close() }
else if (document.all){
if (event.keyCode==hotkey) window.close() }
}
document.onkeypress=gogo
-->
</script>

你可能感兴趣的:(C++,c,Web,C#)