1.
console.time('global')
// 要执行的代码放中间
console.timeEnd('global')
2.
// 这里脚本的时间范围有限制,0~999ms
console.log( new Date().getMilliseconds() )
// 要执行的代码放中间
console.log( new Date().getMilliseconds() )
js 查看脚本运行时间的办法
猜你喜欢
转载自www.cnblogs.com/lambertlt/p/12694461.html
今日推荐
周排行