function demo(e){
var key;
if(window.event){
key=event.keycode;
}
else{
key=e.which;
}
}
jquery demo:
$("id").bind('click'),function(e){
var key=(e.which)?e.which:event.keycode;
})
function demo(e){ var key; if(window.event){ key=event.keycode; } else{ key=e.which; } } jquery demo: $("id").bind('click'),function(e){ var key=(e.which)?e.which:event.keycode; }) ![]() |