Date.parse Firefox返回Nan的解决办法

不知何故,firefox对于类似“2014-09-03 15:55:00”这种时间的转换格式不感冒,返回Nan,,ECSHOP开发中心()技术经过研究解决,把“-”替换为“/”就可以了;<script type=”text/javascript”>

<!–

var inputDate=”2010-12-20 15:55:00″;inputDate=inputDate.replace(“-”, “/”).replace(“-”, “/”);var nowDate=new Date();//alert(Date.parse(inputDate))//alert(Date.parse(nowDate))if(Date.parse(inputDate)<Date.parse(nowDate)){alert(“对不起,输入时间不能晚于当前时间!”);}// –>

</script>

你看报表时,梅里雪山的金丝猴刚好爬上树尖。

Date.parse Firefox返回Nan的解决办法

相关文章:

你感兴趣的文章:

标签云: