JS字符串截取 “指定字符” 前面和后面的内容!
var string= “07/12”
var before = string.split(’/’)[0]
var after = string.split(’/’)[1]
console.log(before,after) // 07 12
JS字符串截取 “指定字符” 前面和后面的内容!
var string= “07/12”
var before = string.split(’/’)[0]
var after = string.split(’/’)[1]
console.log(before,after) // 07 12