按键兼容
<script type="text/javascript">
document.onkeydown=kp;
function kp(e){
if(!e)var e=window.event;
var kc=e.which||e.keyCode;
switch(kc){
case 13: alert('carriage return'); break;
case 27: self.opener=null;self.close(); break;
}
}
</script>
document.onkeydown=kp;
function kp(e){
if(!e)var e=window.event;
var kc=e.which||e.keyCode;
switch(kc){
case 13: alert('carriage return'); break;
case 27: self.opener=null;self.close(); break;
}
}
</script>