Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var win = Ti.UI.createWindow({
- backgroundColor: '#FFF'
- });
- var textField = Ti.UI.createTextField({
- hintText: 'Digite seu nome',
- top: 30,
- height: 40,
- width: 300,
- borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED
- });
- win.add(textField);
- var button = Ti.UI.createButton({
- title: 'clique aqui',
- top: 100,
- height: 50,
- width: 200,
- });
- button.addEventListener('click', function(e) {
- Ti.UI.createAlertDialog({
- message: 'Olá ' + textField.value
- }).show();
- });
- win.add(button);
- win.open();
Add Comment
Please, Sign In to add comment