输入框:输入速度和是否为删除、增加

var lastInput = {
d: "",
flag: true,
timeContainer:0,
test: function (str) {
if (str - this.d > 0) {
this.flag = true;
} else {
this.flag = false;
}
this.d = str;
return this.flag;
},
twoClickFast:function(){
var nowTime = (new Date()).getTime();;
var f = (nowTime - this.timeContainer) < 600 ? true : false;
this.timeContainer = nowTime;
return f;
}
}



posted @ 2017-09-28 14:56  Mr.方  阅读(171)  评论(0编辑  收藏  举报