![]() |
|
|
+ Search |
![]()
|
Apr 8th, 2008 18:30
ha mo, Dave Clark, smile venkii,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Smile,
The onkeydown event exposes the Delete key value as 46.
function chkKey(e) {
var mykey, alt, ctrl, shift;
if (window.Event) {
mykey = e.which;
alt = (e.modifiers & Event.ALT_MASK) ? true : false;
ctrl = (e.modifiers & Event.CONTROL_MASK) ? true : false;
shift = (e.modifiers & Event.SHIFT_MASK) ? true : false;
} else {
mykey = event.keyCode;
alt = event.altKey;
ctrl = event.ctrlKey;
shift = event.shiftKey;
}
if (mykey==46)
alert("Delete key pressed.');
return true;
}
document.onkeydown = chkKey;
Take care,
Dave Clark
www.DaveClarkConsulting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com