how can i detect that delete key is pressed i am working with lot of images generated dynamically with php. now i want to provide a functionality so that when delete key is pressed that images is removed from page but the problem is that how can i detect that a delete key is pressed please point me in the right direction such as
$('img').delete(function(){
// delete code
});
is this possible using jquery, javascript or php.
Take a look at this: https://api.jquery.com/keydown/ Inside the function you can remove the image.