js Uncaught TypeError: nowtime.substr is not a function
文章描述:
js在使用substr时候报错substr is not a function
console.log(nowtime.substr(0,4));
报错
解决办法
转化成字符串再去截取
console.log(nowtime.toString().substr(0,4));
发布时间:2023/04/20
文章描述:
js在使用substr时候报错substr is not a function
console.log(nowtime.substr(0,4));
报错
转化成字符串再去截取
console.log(nowtime.toString().substr(0,4));
发表评论