Metro样式从在线加载Js [英] Metro Style Loading Js From Online
问题描述
我正在Windows 8上使用Visual Studio 2012 Ultimate.
I'm working with Visual studio 2012 ultimate on Windows 8.
我正在开发html5/js Metro-style-application.
I'm developing a html5/js metro-style-application.
我想从在线动态加载我的js文件.喜欢;
I want to dynamicly load my js file from online. Like;
<script src="http://example.com/js/myJsFile.js"></script>
但是地铁应用程序说;
But metro application says;
APPHOST9601:无法加载 http://example.com/Scripts/myJsFile.js.一个 应用程序无法在本地上下文中加载远程Web内容.
APPHOST9601: Can’t load http://example.com/Scripts/myJsFile.js. An app can’t load remote web content in the local context.
我该如何解决这个问题? 谢谢...
How can I solve that problem ? Thanks...
推荐答案
您只能在Web上下文中运行的页面中包含外部js文件.
You can only include external js files from pages running in the web context.
有关此的更多信息,您可以在这里找到:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465373.aspx
More about this you can find here:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465373.aspx
这篇关于Metro样式从在线加载Js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!