摘要:
话不多说 直接上代码 changeTime(){ let nowTime = new Date() let year = nowTime.getFullYear() let month = nowTime.getMonth()+1 if((month+'').length==1){ month = 阅读全文
摘要:
1.使用isNaN()函数 isNaN()的缺点就在于 null、空格以及空串会被按照0来处理 NaN: Not a Number /***判断是否是数字***/ function isRealNum(val){ // isNaN()函数 把空串 空格 以及NUll 按照0来处理 所以先去除 // 阅读全文