document.onkeydown = keydown;
function keydown(event) {
var code;
var e;
if (document.all) {
if (!event) {
var e = window.event;
code = e.keyCode;
}
}
else if (event.which) {
code = event.which;
e = event;
}
if (code == 9) {//Write some logic
}
}
function keydown(event) {
var code;
var e;
if (document.all) {
if (!event) {
var e = window.event;
code = e.keyCode;
}
}
else if (event.which) {
code = event.which;
e = event;
}
if (code == 9) {//Write some logic
}
}
No comments:
Post a Comment