Let the storm money come!

js 截取字符串,转化为 Date 型

代码
    function parseDate(dateFormate) {
        
var year = dateFormate.substring(04);
        
var month = dateFormate.substring(57);
        
var day = dateFormate.substring(810);
        
var hour = dateFormate.substring(1113);
        
var minute = dateFormate.substring(1416);
        
var second = dateFormate.substring(1719);
        
        
var date = new Date();
        
        alert(year 
+ "-" + month + " - " + day + "-" + hour + "-" + minute + "-" + second );
    }

 

posted @ 2010-04-02 09:50  精密~顽石  阅读(436)  评论(0编辑  收藏  举报
在通往地狱的路上,加班能使你更快到达。