简体   繁体   English

可以在 Android 中使用 JavaScript 文件吗?

[英]Can JavaScript files be used in Android?

I need to add some JavaScript code to my program.我需要在我的程序中添加一些 JavaScript 代码。 Is it possible to add .js files in Android?是否可以在 Android 中添加.js文件? If so, can you tell me the way how to do it, and extract the codes.如果是这样,你能告诉我怎么做,并提取代码。

Yes.Using Phonegap you can use JS files in android. Yes.Using Phonegap你可以在android中使用JS文件。

Here is the link to get you started.这是帮助您入门的链接。

http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html http://docs.phonegap.com/en/2.0.0/guide_getting-started_android_index.md.html

http://coenraets.org/blog/phonegap-tutorial/ http://coenraets.org/blog/phonegap-tutorial/

或者,如果您的应用程序是原始的,您就可以使用WebView

You cannot use Js Files directly into android.不能将 Js 文件直接用于 android。 Instead use Codarva or else phonegap to have the Js files而是使用 Codarva 或 phonegap 来获取 Js 文件

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

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