![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JS
穹劲天空
这个作者很懒,什么都没留下…
展开
-
js中获取后台Map的长度
有些时候,我们希望获得Map的长度,下面是解决的方法var length = Object.keys(map).length ; 其中map就是后台传过来的Map原创 2015-05-23 01:18:43 · 24897 阅读 · 1 评论 -
Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document
最近在开发一个网站时,有个需要是 如果有新预警信息要在网页中播放提示音。页面打开会请求是否有新信息,有则播放提示音。在Chrome的最新浏览器中,播放会报错,控制台显示Uncaught (in promise) DOMException: play() failed because the user didn't interact with the document first.搜索发现Chrom...转载 2019-06-28 10:53:56 · 44905 阅读 · 8 评论