我使用JavaScript来把定时器在我的网页。 当按下启动按钮,时钟开始时间戳。
所有的东西都没有任何错误正常工作。
代码
initialize_timer: function() {
this.project_m2o = new project_timesheet.FieldMany2One(this, {model: this.project_timesheet_model , classname: "pt_input_project pt_required", label: "Select a project", id_for_input: "project_id"});
this.project_m2o.on("change:value", this, function() {
var project = [this.project_m2o.get('value'), this.project_m2o.$input.val()];
this.project_timesheet_db.set_current_timer_activity({project_id: project});
this.set_project_model();
现在,每当页面刷新武功的时钟应该继续,但再次与初始化00:00
。
指导我来对付它!