var str = 'yyyy-mm-dd hh:mm:ss';var reg = /-| |:/g;alert(str.replace(reg,''));运用时只需换成数字即可
.replace(/\-| |:/g,"")