Back

titanium api - 1. global

发布时间: 2014-12-31 23:19:00

refer to :  http://docs.appcelerator.com/titanium/latest/#!/api

Global 有三个全局方法:

console:  info, debug, warn ... 用来显示输入和输出的。 跟 firebug的 console 不太一样。倒是跟 nodejs的基本一致 . 

值得一提的是,可以传入多个参数。

JSON:  parse(解析JSON 字符串),  stringify. (把hash 变成string来输出)

String:  主要是几个 format方法:  format, formatDate, formatCurrency, formatTime 等等。

具体的例子就不写了。 基本都是 上来就用。 

console.info ...

JSON.parse...

String.format ... 

Back