摘要: PhoneGap API帮助文档翻译Notification提醒是本文要介绍的内容,主要是来了解PhoneGap API文档的内容,具体PhoneGap API文档内容的详解来看本文,设备的视觉、听觉和触觉通知。方法:notification.alert notification.confirm notification.beep notification.vibrate notification.alert显示一个定制的警告或对话框。navigator.notification.alert(message,alertCallback,[title],[buttonName]); naviga 阅读全文
posted @ 2013-03-04 16:11 残星 阅读(421) 评论(0) 推荐(0) 编辑
摘要: setTimeout尽量使用:setTimeout(function(){},1000);这种格式;即使是一个方法也放进大括号里面去,那样不容易报错,可以使用的变量(如参数传递等)。function refresh_move(tag){ tag.style.top = '1px'; tag.style.left = '1px'; setTimeout(function(){tag.style.top = '0px';tag.style.left = '0px';}, 100);} 阅读全文
posted @ 2013-03-04 14:26 残星 阅读(549) 评论(0) 推荐(0) 编辑
摘要: 1. 例子: var tempStr = "tempText" ; tempStr.indexOf("Texxt"); //返回大于等于0的整数值,若不包含"Text"则返回"-1。2. indexOf用法: strObj.indexOf(subString[, startIndex]) JavaScript中indexOf函数方法返回一个整数值,指出 String 对象内子字符串的开始位置。如果没有找到子字符 串, 则返回 -1。如果 startindex 是负数,则 startindex 被当作零。如果它比最大的字符位置 阅读全文
posted @ 2013-03-04 11:13 残星 阅读(102961) 评论(0) 推荐(1) 编辑