首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

js变换当前时间为数字进行比较(兼容IE所有版本)

2013-10-28 
js转换当前时间为数字进行比较(兼容IE所有版本)/** * 把时间转换为整数 */convertTimeToInt : function(ti

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);},

?

?

热点排行