/*
* PhoneGap Essential Training by ninghao.net
*/
var app = {
// 应用构造器
initialize: function() {
this.bindEvents();
var watchID = null;
},
// 绑定事件监听器
bindEvents: function() {
document.addEventListener('deviceready', this.onDeviceReady, false);
},
// deviceready 事件处理
onDeviceReady: function() {
app.receivedEvent('deviceready');
var startWatch = document.getElementById('startwatch');