I am working with Javascript/Safari on the IPad and I notice things are a little different than on standard browsers. One of the things I was wondering if there is a keycode or mouseevent or any way of detecting whe开发者_JS百科n the IPad/IPod Button(the circular button with the square at the bottom) or the power button is pressed using javascript or another method?
Sorry, but this isn't possible. (It's not even possible for a full-blown iOS app to detect "home" button activity.)
No, it is just impossible to do that from a WebPage with JavaScript. Sorry to bring the bad news to you.
精彩评论