且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Windows 8 Metro设置弹出窗口似乎无法在Javascript中运行?

更新时间:2023-11-21 13:31:46

在settings.html页面中,确保data-win-control声明包括设置commandId的名称-在线示例中似乎缺少此名称

In your settings.html page, make sure the data-win-control declaration includes setting the name of the commandId - this seems to be missing from the online example.

例如.

如果您的js文件将命令声明为:

If your js file declares the command as:

e.detail.applicationcommands = { 'serv_changer': { title: 'Change Server', href: 'settings.html' } };

...然后确保您的settings.html文件引用了"serv_changer":

...then make sure your settings.html file references 'serv_changer':

<div data-win-control="WinJS.UI.SettingsFlyout" data-win-options="{settingsCommandId:'serv_changer', width:'wide'}">