Javascript Windows应用程序JS中的文档导航

Javascript Windows应用程序JS中的文档导航,javascript,jquery,html,windows-8,windows-applications,Javascript,Jquery,Html,Windows 8,Windows Applications,如果应用程序是第一次运行,我正在尝试将default.html文件导航到update.html。我正在使用jQuery2库。代码是: runTime = parseInt(getSettings("runTime")); if (runTime == 0) { document.location = "settings.html"; } else { runTime++; setSettings("runTime", runTime); } getSettings是获取

如果应用程序是第一次运行,我正在尝试将
default.html
文件导航到
update.html
。我正在使用jQuery2库。代码是:

runTime = parseInt(getSettings("runTime"));
if (runTime == 0) {
    document.location = "settings.html";
} else {
    runTime++;
    setSettings("runTime", runTime);
}
getSettings
是获取本地设置的自定义函数。在Javascript控制台中,我看到导航出现在
update.html
上,但应用程序在启动屏幕上运行。

设置.html很好吗?是的。当我将默认页面设置为
settings.html
时,它加载时不会出错。