faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 11 people (27%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

can i disable delete key

Apr 8th, 2008 19:06
ha mo, Dave Clark, blessy thomas,


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blessy,
     Disable?  No.  But most browsers will let you cancel most 
keystrokes:
function NoDeleteKey(e)
{
    var key = (e) ? e.which : event.keyCode;
    if (key == 46) return false; // Delete key
    return true;
}
document.onkeydown = NoDeleteKey;
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