https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/0014344997235247b53be560ab041a7b10360a567422a78000
function Cat(name) { this.name = name; this.say = function(){ alert('Hello,' + this.name + '!'); };}
没有明白
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'ssh://cxy@118.190.62.2:29418/fullstack-training.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
定时器完整代码
Title
这是一个倒计时
require.config({
paths : {
"jquery" : ["http://libs.baidu.com/jquery/2.0.3/jquery", "js/jquery"],
"cut" : "js/countdown"
}
})
require(["jquery","cut"],function($, cut){
cut.start();
cut.stop();
// $(function(){
// alert("load finished");
// })
})
define(function () {
function Countdown(time) { var isRuning = false; //计时器运行标识var timeSet = time || 10; //计时器秒数// 启动定时器this.start = function () { isRuning = true; console.log('countdown start now....') var timmer = function() { if (isRuning && timeSet > -1) { console.log(timeSet); setTimeout(timmer, 1000); timeSet -= 1; } } timmer();
} // 停止定时器 this.stop = function () { isRuning = false; console.log('countdown stop now ...') }}
var t = new Countdown(); return { start:t.start, stop:t.stop }// t.start(); // t.stop(); })
https://www.liaoxuefeng.com/wiki/001434446689867b27157e896e74d51a89c25cc8b43bdb3000/001434499763408e24c210985d34edcabbca944b4239e20000
雪峰的面向对象部分
http://www.runoob.com/w3cnote/requirejs-tutorial-2.html
JS模块化工具requirejs教程 W3C 如何配置
http://118.190.62.2:10101/blob/fullstack-training.git/551debd65a644fe95eb6f47a6d876b3b6998b269/training%2F%E5%85%A8%E6%A0%88%E5%9F%B9%E8%AE%AD%E8%AE%A1%E5%88%92.md
每天任务地址,以及文档地址