回到顶部
字符串的截取
str.substring(0,index)
字符串转换为日期
<script> var s = "2017-04-10"; var d = s.replace(/-/g,"/"); var date = new Date(d); ------------------------------- var d2 = "2017/04/10 12:23:12"; var date = new Date(d2); </script>