![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
html
穹劲天空
这个作者很懒,什么都没留下…
展开
-
检查一段文本中的HTML标签是否闭合,若不闭合则修复
Java的正则引擎(java.util.regex)做不到未知层次递归匹配,再说这个用正则效率不会高,所以考虑其他方法实现。对于.Net平台,可尝试一下这个正则:^[^<>]*(?:<(?!/)(?<o>[^/s<>]+)(?:/s[^<>]*)?(?:(?<-o>/>)|>)[^<>]*|(?<-o&...转载 2019-06-13 11:21:13 · 2344 阅读 · 0 评论 -
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 评论