function shijiantime(times){ var timearr = times.replace(" ", ":").replace(/:/g, "-").split("-"); var timestr = ""+timearr[0]+"/" + timearr[1] + "/" + timearr[2] //var timestr = "" + timearr[1].split("")[1] + "月" + timearr[2] + "日 " + timearr[3] + ":" + timearr[4] + "" return timestr
}
实际效果