问题描述
当用户单击IE 10中呈现的网页上的链接时,我想在Windows 8中启动Metro应用程序.
I want to launch a metro application in windows 8 when user clicks a link on a web page that is rendered in IE 10.
推荐答案
如果您有Metro应用程序,则您的网站可以要求IE通过添加一些元标记来显示安装/启动按钮:
If you have a Metro application your website can ask IE to show an install/launch button by adding some meta tags:
<meta name="msApplication-ID"content="{ID}"/>
<meta name="msApplication-PackageFamilyName"content="{PackageFamilyName}"/>
详细信息,位于 http://msdn .microsoft.com/en-us/library/ie/hh781489(v = vs.85).aspx
您还可以注册您的Metro应用程序以处理链接可能指向的协议和文件.然后,这将提示用户打开默认应用程序或选择其他应用程序(类似于从Web下载文件).
You can also register your Metro application to handle protocols and files which the link could point to. This would then prompt the user to open the default application or choose another (much like download files from the web).
注册协议: http://msdn.microsoft.com/en-us/library /windows/apps/hh452686.aspx
注册为文件处理程序: http://msdn.microsoft.com/en-us/library /windows/apps/hh452684.aspx
Registering as a file handler:http://msdn.microsoft.com/en-us/library/windows/apps/hh452684.aspx
这篇关于如何在Windows 8中使用javascript从IE启动Metro应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!