I'm using http:开发者_Python百科//onehackoranother.com/projects/jquery/boxy/
How to close boxy window on press ESC key?
if (this.options.closeable) {
jQuery(document.body).bind('keypress.boxy', function(evt) {
var key = evt.which || evt.keyCode;
if (key == 27) {
self.hide();
jQuery(document.body).unbind('keypress.boxy');
}
});
}
精彩评论