![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
工作中遇到的问题
ilovexiaoming1
这个作者很懒,什么都没留下…
展开
-
Feature Police 导致iframe页面无法使用粘贴功能
说明在Chrome 81版本之上时,通过iframe引入的页面无法正常使用粘贴板。此时,控制台会输出DOMException: The Clipboard API has been blocked because of a permissions policy applied to the current document. See https://goo.gl/EuHzyv for more details.错误,这是由于web规范之Feature Police导致的。Feat...转载 2022-02-10 17:34:16 · 2037 阅读 · 1 评论 -
js 网页禁止复制
#禁止右键document.oncontextmenu = function(){ return false; }#禁止选中文字document.onselectstart = function(){ return false; }#只限制使用:如果只限制复制,可以在<body>加入以下代码:<body oncopy="alert('对不起,禁止复制!');return false;">#阻止默认事件来禁止:documentment.o...原创 2021-12-13 09:13:27 · 5204 阅读 · 0 评论