倒计时函数封装

define(function(require, exports, module) {

    function Countdown(countButton){
        this.countButton = countButton;
        this.oSendCodeTimer = undefined;
        this.oSendCodeNum = 60;
        this.isStart = false;
        ........
    module.exports =Countdown;
})

node

  1. nodejs项目在使用handlebars时,改文件后缀的设置(主要是html文件)。
    1-1: 首先将views下面的html文件后缀改成’文件名.html’。(有的文件名是’xx.hbs,有的则不一定。。’)
    1-2:在app处增加如下代码:

     app.set('view engine', 'html');
    	
     app.engine('html', require('hbs').__express);
    
  2. 判断微信以及IOS和安卓系统。

js计算闰年平年

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
	<title></title>
</head>
<body>
<script language="JavaScript">
var isSmoothYear = function(year)
{
     return (new Date(year , 2 , 0).getDate() == 29?"闰年":"平年");
}
console.log("2015年 是润年吗? \t" + isSmoothYear(2015));
console.log("2016年 是润年吗? \t" + isSmoothYear(2016));
console.log("2017年 是润年吗? \t" + isSmoothYear(2017));
console.log("2018年 是润年吗? \t" + isSmoothYear(2018));
console.log("2019年 是润年吗? \t" + isSmoothYear(2019));
console.log("2020年 是润年吗? \t" + isSmoothYear(2020));
</script>
</body>
</html>

Jekyll目录结构与变量

  • /^\d{16} \d{19}$/ –银行卡–
  • 什么是正则表达式?

ajax,jq,node

模板部分:product-list-tpl.html

<script type="text/juicer" id="product-list-tpl">
    {@each products as product}
    {@set statusName = '' }
    {@set className = '' }
    {@if product.status =='销售中' }