我试图控制后退按钮,但我不能。
event.keyCode == 27 //thats for escape event.keyCode == 8 //thats for backspace..its also working on browser but it doesnt work on my tablet.
有什么建议么??
您需要听navigation事件和state.direction。
navigation
state.direction
$(window).on("navigate", function (event, data) { var direction = data.state.direction; if (direction == 'back') { // do something } if (direction == 'forward') { // do something else } });
jQM API: 导航事件