03 2012 档案

摘要:webView.url = "html/index.html"; 这是我的本地网页! var win = Titanium.UI.createWindow({ title:"Loading Local and Remote Web Pages", backgroundColor:"#FFFFFF",});var loadLocalButton = Titanium.UI.createBu... 阅读全文
posted @ 2012-03-17 22:32 校长阿四 阅读(444) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"Creating a Map and Setting the Location", background:"#FFFFFF", exitOnClose:true});//Android users will need to be sure to test with the Google APIs in... 阅读全文
posted @ 2012-03-17 16:45 校长阿四 阅读(477) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2012-03-17 16:28 校长阿四 阅读(345) 评论(0) 推荐(0)
摘要:android无法运行 // this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup = Titanium.UI.... 阅读全文
posted @ 2012-03-17 16:21 校长阿四 阅读(376) 评论(0) 推荐(0)
摘要:// this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup = Titanium.UI.createTabGr... 阅读全文
posted @ 2012-03-17 16:11 校长阿四 阅读(388) 评论(0) 推荐(0)
摘要:// this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup = Titanium.UI.createTabGr... 阅读全文
posted @ 2012-03-17 16:01 校长阿四 阅读(364) 评论(0) 推荐(0)
摘要:// this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup = Titanium.UI.createTabGr... 阅读全文
posted @ 2012-03-17 15:49 校长阿四 阅读(379) 评论(0) 推荐(0)
摘要:app.js // this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup = Titanium.UI.... 阅读全文
posted @ 2012-03-17 15:39 校长阿四 阅读(422) 评论(0) 推荐(0)
摘要:android无法打开,ios支持 app.js // this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup ... 阅读全文
posted @ 2012-03-17 15:27 校长阿四 阅读(459) 评论(0) 推荐(0)
摘要:// this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup = Titanium.UI.createTabGr... 阅读全文
posted @ 2012-03-17 15:14 校长阿四 阅读(556) 评论(0) 推荐(0)
摘要:hasDetail在android上无法显示 // this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup = T... 阅读全文
posted @ 2012-03-17 14:48 校长阿四 阅读(478) 评论(1) 推荐(0)
摘要:app.js // this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup = Titanium.UI.... 阅读全文
posted @ 2012-03-17 14:35 校长阿四 阅读(501) 评论(0) 推荐(0)
摘要:// this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup = Titanium.UI.createTabGr... 阅读全文
posted @ 2012-03-17 13:27 校长阿四 阅读(628) 评论(1) 推荐(0)
摘要:在android下无法隐藏bar,在ios下可以 // this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI.setBackgroundColor('#000');// create tab groupvar tabGroup =... 阅读全文
posted @ 2012-03-17 13:18 校长阿四 阅读(416) 评论(0) 推荐(0)
摘要:app.js Titanium.UI.setBackgroundColor("#000");var tabGroup = Titanium.UI.createTabGroup();var toursWindow = Titanium.UI.createWindow({ title:"Tours", backgroundColor:"#FFFFFF", //因为 wind... 阅读全文
posted @ 2012-03-17 12:44 校长阿四 阅读(723) 评论(0) 推荐(0)
摘要:Titanium.UI.setBackgroundColor("#000");// 创建 tab groupvar tabGroup = Titanium.UI.createTabGroup();//第一件事你要注意当 Tab Groups开始工作的时候//tab group 函数作为控制 "window"//每一个 tab 有自己的 window 作为一个单独的运行环境//要记住... 阅读全文
posted @ 2012-03-17 11:26 校长阿四 阅读(806) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2012-03-17 01:11 校长阿四 阅读(405) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"Adding Interactivity to Any View", backgroundColor:"#FFFFFF", exitOnClose:true})var view = Titanium.UI.createView({ top:0, left:0, height:54, width:"10... 阅读全文
posted @ 2012-03-17 01:09 校长阿四 阅读(544) 评论(0) 推荐(0)
摘要:该功能无法再android使用,只能在ios上正常显示 var win = Titanium.UI.createWindow({ title:"Configuring text field and text area keyboard types", backgroundColor:"#FFF", exitOnClose:true});//These buttons will appear... 阅读全文
posted @ 2012-03-17 01:02 校长阿四 阅读(538) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"Configuring text field and text area keyboard types", backgroundColor:"#FFF", exitOnClose:true});var textField = Titanium.UI.createTextField({ top:75, ... 阅读全文
posted @ 2012-03-17 00:55 校长阿四 阅读(515) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"Creating Text Fields and Text Areas", backgroundColor:"#FFFFFF", exitOnClose:true})//var textField1 = Titanium.UI.createTextField({ top:60, height:6... 阅读全文
posted @ 2012-03-17 00:49 校长阿四 阅读(577) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"Creating a Date/Time Picker", backgroundColor:"#FFFFFF", exitOnClose:true});//We'll use Javascript's Date object within the date pickervar minDate = ne... 阅读全文
posted @ 2012-03-17 00:43 校长阿四 阅读(1051) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"Creating a Multi-Column Picker", backgroundColor:"#FFFFFF", exitOnClose:true});//To save time, we are going to create an array of objects to populate o... 阅读全文
posted @ 2012-03-17 00:37 校长阿四 阅读(610) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"Creating a Single-Column Picker", backgroundColor:"#FFF", exitOnClose:true});//A single column pickervar picker = Titanium.UI.createPicker({ bottom:0, ... 阅读全文
posted @ 2012-03-17 00:30 校长阿四 阅读(595) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"创建开关", backgroundColor:"#FFF", exitOnClose:true});var switch1 = Titanium.UI.createSwitch({ top:100, value:true, //设置开关的初始值, true 或 false ( 在iOS为1 或 0 ,... 阅读全文
posted @ 2012-03-17 00:13 校长阿四 阅读(515) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ backgroundColor:"#FFF"});var slider1 = Titanium.UI.createSlider({ height:"auto", width:300, top:100, min:0, //slider最小值 (Android) max:10 //slider最大值 (Android)});... 阅读全文
posted @ 2012-03-16 23:01 校长阿四 阅读(541) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"创建按钮", backgroundColor:"#FFFFFF", exitOnClose:true});var simpleButton = Titanium.UI.createButton({ title:"按住我", width:"25%", height:"10%", top:"10%", ... 阅读全文
posted @ 2012-03-16 22:13 校长阿四 阅读(528) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"监听事件", backgroundColor:"#FFFFFF", exitOnClose:true});var img01 = Titanium.UI.createImageView({ image:"images/box01.png", height:75, width:75, top:24, l... 阅读全文
posted @ 2012-03-16 21:56 校长阿四 阅读(545) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"Grouping and Nesting Views", backgroundColor:"#FFFFFF", exitOnClose:true})//第一, 我们创建一些views 为了把图片和文字显示var view01 = Titanium.UI.createView({ top:0, left... 阅读全文
posted @ 2012-03-16 21:42 校长阿四 阅读(486) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"理解 Z-Depth", backgroundColor:"#FFFFFF", exitOnClose:true})var imageView01 = Titanium.UI.createImageView({ image:"images/box01.png", height:75, wi... 阅读全文
posted @ 2012-03-16 21:29 校长阿四 阅读(502) 评论(0) 推荐(0)
摘要:上面其实是两个image view 我们进行了叠加,下面的图片则是远程获取到的不是本地的图片 var win = Titanium.UI.createWindow({ title:"使用Image View", backgroundColor:"#FFFFFF", exitOnClose:true});//image视图var imageView01 = Titanium.UI.creat... 阅读全文
posted @ 2012-03-16 19:21 校长阿四 阅读(601) 评论(0) 推荐(0)
摘要:var win = Titanium.UI.createWindow({ title:"文本视图", backgroundColor:"#FFFFFF", exitOnClose:true})var label01 = Titanium.UI.createLabel({ text:"文本标签 01", top:0, left:0, height:24, width:"100%", tex... 阅读全文
posted @ 2012-03-16 18:52 校长阿四 阅读(617) 评论(0) 推荐(0)
摘要://创建一个windowvar win = Titanium.UI.createWindow({ title:"window标题", //这个标题只在Android中显示; 在iOS, window 需要一个Tab group才能显示 backgroundColor:"#FFCC00", //window的背景颜色设置,这里设为橙色 exitOnClose: true... 阅读全文
posted @ 2012-03-16 18:16 校长阿四 阅读(637) 评论(0) 推荐(0)
摘要:有两种方式检测你的程序将要运行在哪个平台 var PLATFORM = Ti.Platform.osname; var myVar = (Ti.Platform.osname === "android") ? 60 : 35 ; 阅读全文
posted @ 2012-03-16 17:54 校长阿四 阅读(506) 评论(0) 推荐(0)
摘要:新建一个titanium mobile工程后,系统自动生成一个app.js文件,无需任何修改,直接启动程序即可。以下便是系统自动生成的代码 app.js // this sets the background color of the master UIView (when there are no windows/tab groups on it)Titanium.UI... 阅读全文
posted @ 2012-03-16 17:37 校长阿四 阅读(1161) 评论(0) 推荐(0)
摘要:data-add-back-btn="true" data-back-btn-text="返回" <!DOCTYPE html> <html> <html lang="zh-CN"> <head> <title>1.7.jquerymobile--返回按钮</title> <meta charset="utf-8"/> <meta name="viewport" content=... 阅读全文
posted @ 2012-03-16 13:53 校长阿四 阅读(6196) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <html lang="zh-CN"> <head> <title>1.6.jquerymobile--列表</title> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel=... 阅读全文
posted @ 2012-03-16 13:46 校长阿四 阅读(698) 评论(0) 推荐(0)
摘要:页面对话框:data-rel="dialog" <!DOCTYPE html> <html> <html lang="zh-CN"> <head> <title>1.5.jquerymobile--页面对话框</title> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initia... 阅读全文
posted @ 2012-03-16 13:29 校长阿四 阅读(905) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <html lang="zh-CN"> <head> <title>1.4.jquerymobile--页面转换效果</title> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="sty... 阅读全文
posted @ 2012-03-16 13:23 校长阿四 阅读(1173) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <html lang="zh-CN"> <head> <title>JqueryMobile--页面导航</title> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="s... 阅读全文
posted @ 2012-03-16 13:06 校长阿四 阅读(641) 评论(0) 推荐(0)
摘要:注意:请把程序发布到动态语言开发环境中,比如php的AppServ中,因为如果放在静态目录中,可能导致文件链接失效。 运行效果和上一篇多页面一样,注意:在第二个文件中并不需要再倒入jquerymobile框架文件!! index.html <!DOCTYPE html> <html> <html lang="zh-CN"> <head> <title>JqueryM... 阅读全文
posted @ 2012-03-16 11:47 校长阿四 阅读(404) 评论(1) 推荐(0)
摘要:<!DOCTYPE html> <html> <html lang="zh-CN"> <head> <title>JqueryMobile--多页面</title> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel... 阅读全文
posted @ 2012-03-16 11:20 校长阿四 阅读(438) 评论(0) 推荐(0)
摘要:<!DOCTYPE html> <html> <html lang="zh-CN"> <head> <title>JqueryMobile模板</title> <meta charset="utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel=... 阅读全文
posted @ 2012-03-16 11:01 校长阿四 阅读(1026) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title>JavaScript.函数arguments对象</title></head><body> <script type="text/javascript"> /* function sayHello(){ //alert(arguments.lengt... 阅读全文
posted @ 2012-03-15 22:30 校长阿四 阅读(190) 评论(0) 推荐(0)
摘要:函数作用域与变量作用域差不多 参考变量作用域 http://www.cnblogs.com/xiaozhanga4/archive/2012/03/04/2379186.html <!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title>2.16.JavaScript.函数作用域... 阅读全文
posted @ 2012-03-15 21:25 校长阿四 阅读(155) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title>2.15.JavaScript.函数声明方式</title></head><body> <script type="text/javascript"> //声明式静态函数 function func... 阅读全文
posted @ 2012-03-15 21:21 校长阿四 阅读(193) 评论(0) 推荐(0)
摘要:for(变量=初始值;变量<=结束值;变量=变量+步进值){ 运行代码 } for(变量 in 对象){ 运行代码 } while(变量<=结束值){ 运行代码 } do{ 需执行的代码 }while(变量<=结束值) <!DOCTYPE HTML><html lang="en-US"><head> <m... 阅读全文
posted @ 2012-03-15 20:37 校长阿四 阅读(175) 评论(0) 推荐(0)
摘要:index.html <!DOCTYPE HTML><html lang="zh-CN"><head> <meta charset="UTF-8"> <link rel="stylesheet" href="main.css"/> <title>选择器属性</title></head><body> <p name="xiao">1234567</p> <p n 阅读全文
posted @ 2012-03-15 19:29 校长阿四 阅读(226) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="zh-CN"><head> <meta charset="UTF-8"> <title>添加点东西</title></head><body> <header> <h1>欢迎</h1> </header> <nav> <ul> <li>主页</li> ... 阅读全文
posted @ 2012-03-15 19:13 校长阿四 阅读(240) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="zh-CN"><head> <meta charset="UTF-8"> <title>设置body</title></head><body> <header> <h1>欢迎</h1> </header> <nav> <ul> <li>主页</li> <li>教程</li> <li& 阅读全文
posted @ 2012-03-15 19:02 校长阿四 阅读(220) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="zh-CN"><head> <meta charset="UTF-8"> <title>创建一个基本HTML5模板</title></head><body> </body></html> 阅读全文
posted @ 2012-03-15 18:45 校长阿四 阅读(336) 评论(0) 推荐(0)
摘要:维基百科 http://zh.wikipedia.org/wiki/HTML5 阅读全文
posted @ 2012-03-15 18:35 校长阿四 阅读(164) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title>2.13.JavaScript.条件语句</title></head><body> <script type="text/javascript"> /* //if else语句 if( 100 > 10 ){ document.write("真"); }else{ 阅读全文
posted @ 2012-03-15 17:34 校长阿四 阅读(191) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title></title></head><body> <script type="text/javascript"> /* alert( 1988 == "1988");//没有比较类型所以返回true alert( 1988 === "1988");//类型 阅读全文
posted @ 2012-03-15 16:59 校长阿四 阅读(179) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title>2.11.JavaScript.多维数组</title> <style type="text/css"> *{ margin:0; padding:0; } body{ background-color:#333; padding:20px; font:12px Verdana,Gene... 阅读全文
posted @ 2012-03-15 16:10 校长阿四 阅读(222) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head><meta charset="UTF-8"><title>数组</title></head><body><script type="text/javascript">/*var arr1 = new Array("xiaozhang","a4","zhaolin");var arr2 = [ 阅读全文
posted @ 2012-03-15 15:03 校长阿四 阅读(147) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head><meta charset="UTF-8"><title>javascript不同数据类型的转换</title></head><body><script type="text/javascript">/*var result = 100 + "100";//声明一个变量document.write( "计算出的结果是:& 阅读全文
posted @ 2012-03-15 15:02 校长阿四 阅读(156) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head><meta charset="UTF-8"><title>内置对象</title></head><body><script type="text/javascript">/*var email = prompt("请输入电子邮箱地址","xiaozhanga4@gmail.com");document.writ 阅读全文
posted @ 2012-03-15 15:02 校长阿四 阅读(158) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title>null和undefined</title></head><body> <script type="text/javascript"> var a;//定义变量但没有类型所以输出为undefinedvar b = null ;//定义变量并制定值为null document.write( 阅读全文
posted @ 2012-03-15 15:00 校长阿四 阅读(246) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title>数值型</title></head><body> <script type="text/javascript"> var num = 1988; /* if(!isNaN(num)){ document.write("非数值型"); } */ if(num.constr 阅读全文
posted @ 2012-03-14 16:29 校长阿四 阅读(184) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title></title></head><body> <script type="text/javascript"> var boolA = true; var boolB = false; var boolC = new Boolean(true); var boolD = new Boolean 阅读全文
posted @ 2012-03-14 16:20 校长阿四 阅读(199) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="en-US"><head> <meta charset="UTF-8"> <title>字符串类型</title></head><body> <script type="text/javascript"> //<![DATA[/*字符串连接 ----------------------------------- var str = "Hello "; 阅读全文
posted @ 2012-03-14 15:57 校长阿四 阅读(174) 评论(0) 推荐(0)
摘要:主要(基本)数据类型是字符串:string数值:number布尔:boolean 不是真true就是假false复合(引用)数据类型对象数组特殊数据类型null:空值但可以进行处理underfind:代表未知事物无法对此进行处理<!DOCTYPE HTML><html lang="zh-CN"><head><title>数据类型</title><meta charset="UTF-8"><script type="text/javascript">/* 阅读全文
posted @ 2012-03-04 14:43 校长阿四 阅读(207) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html lang="zh-CN"><head><meta charset="UTF-8"><title>变量的作用域</title><script type="text/javascript">/*//声明同一个变量后者会覆盖前者所以输出的应该是最后一个变量值var foo = "Hello World 1";foo = "Hello World 2";document.writ 阅读全文
posted @ 2012-03-04 13:18 校长阿四 阅读(234) 评论(0) 推荐(0)
摘要:javascript的标识符由字母、下划线和$符号组成world_world$world不能和系统关键字或保留字冲突例子:<!DOCTYPE HTML><html lang="zh-CN"><head><meta charset="UTF-8"><title></title><script type="text/javascript">var world;var _world;var $world;document.write( world + &qu 阅读全文
posted @ 2012-03-04 13:17 校长阿四 阅读(200) 评论(0) 推荐(0)