简体   繁体   English

phonegap中脚本标签的src属性

[英]src attribute of script tag in phonegap

Can i use following line of code in phonegap? 我可以在phonegap中使用以下代码行吗?

<script type="text/javascript" src="//js.live.net/v5.0/wl.js" ></script>

where src is pointing to javascript api of skydrive. src指向skydrive的javascript API。 Is it possible to connect to servers using src in phonegap? 是否可以在phonegap中使用src连接到服务器? Or is it similar to files loaded to browser from local filesystem which does not work if the above line is there. 还是类似于从本地文件系统加载到浏览器的文件,如果上面的行在那里,该文件将不起作用。

Or is it similar to files loaded to browser from local filesystem which does not work if the above line is there. 还是类似于从本地文件系统加载到浏览器的文件,如果上面的行在那里,该文件将不起作用。

It is exactly the same. 完全一样。 You aren't loading the PhoneGap application over HTTP or HTTPS, so you can't use a scheme relative URI to load resources available via those schemes. 您不会通过HTTP或HTTPS加载PhoneGap应用程序,因此无法使用与方案有关的URI来加载可通过这些方案使用的资源。

Be explicit and use http://js.live.net/v5.0/wl.js or https://js.live.net/v5.0/wl.js . 要明确,并使用http://js.live.net/v5.0/wl.jshttps://js.live.net/v5.0/wl.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM