元素class类名的添加和删除之classList

764 阅读1分钟









附:

let str = '/calcRuleEdit/fbfd551fec4e4d1ba75a40a0df88877e'
let reg = /^\/\w+/
console.log(98,reg.exec(str)[0])

取第二个斜线 前面的