如何从另一个javascript文件中调用javascript文件的函数而不使用钛中的HTML

Aje*_*rya 1 javascript titanium appcelerator titanium-mobile

嗨我正在使用Appcelerator构建iOS应用程序,

我有一个文件app.js和一个文件webService.js

webService.js文件包含一个 function x

现在从我的app.js文件我想调用 文件中function x存在的webService.js.

我搜索了很多,但我只发现使用html..i我没有使用任何HTML,它只是纯粹的JavaScript.

dku*_*rni 6

你尝试过使用过吗?

Ti.include('path/file.js');
Run Code Online (Sandbox Code Playgroud)