- 履歴一覧
- 現在との差分 を表示
- ソース を表示
- 履歴 を表示
- Alloy/イベントハンドラを取りつける へ行く。
- 1 (2013-12-29 (日) 07:11:48)
- 2 (2013-12-29 (日) 07:55:34)
- 3 (2013-12-31 (火) 15:12:18)
- 追加された行はこの色です。
- 削除された行はこの色です。
*キーワード [#yb737c53] - Titanium Mobile - Alloy *概要 [#y8ca614d] コントロールにイベントハンドラを取りつけます。 *方法 [#e1e86c56] - index.xml <Label id="label1">I am Window 1</Label> - index.js $.label1.addEventListener('click', function() { Titanium.UI.createAlertDialog({title:'Click', message:'You clicked it.'}).show(); }); *解説 [#ue1ca936] index.xml のタグ中に onclick 属性を書くこともできるようですが、分離の観点から index.js に書くのがよいでしょう。 *参考 [#t17fd539] - [[Titanium 3.X - Appcelerator Docs>http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.Proxy-method-addEventListener]]