2
沒有像event.stopPropogation()或preventDefault()這樣的默認方法。 如何停止事件的默認行爲(硬件後退按鈕)?如何在WinJS for Mobile App中抑制硬件後退事件?
沒有像event.stopPropogation()或preventDefault()這樣的默認方法。 如何停止事件的默認行爲(硬件後退按鈕)?如何在WinJS for Mobile App中抑制硬件後退事件?
這是解決方案。
var app = WinJS.Application;
app.onbackclick = function (evt) {
// Code that handles event ...
// Need to return true to cancel the default behavior of this event.
return true;
}