[英]how to navigate one page to another in iphone and android using titanium studio
I am fresher in titanium for mac os x. 对于Mac OS X,我的钛更新鲜。
I am using titanium first time and do not have any knowledge on js pages and action event's 我是第一次使用Titan,对js页面和动作事件没有任何了解
I am setup titanium and add button. 我设置钛并添加按钮。 On button click i need to navigate to another js page
在按钮上单击,我需要导航到另一个js页面
and this project will run into iPhone and android device 该项目将运行到iPhone和android设备
如果您是新手,那么厨具是学习钛的最佳实践。
in app.js file write 在app.js文件中写入
var win = Ti.UI.createWindow({
backgroundColor : 'red'
});
win.open();
var button = Ti.UI.createButton({
title : 'click me to open new window'
});
win.add(button);
button.addEventListener('click', function(e){
var newWindow = Ti.UI.createWindow({
url : 'newWindow.js',
backgroundColor : 'white'
});
newWindow.open();
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.