读书人

js变换当前时间为数字进行比较(兼容I

发布时间: 2013-10-28 11:21:45 作者: rapoo

js转换当前时间为数字进行比较(兼容IE所有版本)
/** * 把时间转换为整数 */convertTimeToInt : function(time){var result = null;if(time != null && time != ""){ result = parseInt(time.replace(/-/g,"").replace(/:/g,""),10);}return result;},// 获取当前时间hhmm的比较值getOraNowTimeInt : function(){ var now = jAnXin.util.formatDate(new Date(), "hh:mm");return this.convertTimeToInt(now);},

?

?

读书人网 >JavaScript

热点推荐