博创互联提供西安网站建设  西安网站制作  西安网络推广  西安公众号开发等服务

155-9687-0725
网站优化百科详情
网站升级
网站制作
网站建设
网站优化百科详情
如何解除网页右键复制
很多人在浏览网页的时候发现无法用鼠标右键进行复制文字,本文将对于此类情况分享一个解除限制的方法
很多人在浏览网页的时候发现无法用鼠标右键进行复制文字,但是这些文字又比较想记录下来,其实是因为站长在自己的网站做了禁止右键和禁止复制,下面本文将对于此类情况分享一个解除限制的方法。
1添加任意网页为书签
2在书签栏右键刚保存的书签选择编辑或属性将网址替换为下面的代码然后保存。

javascript:(function(){var%20doc=document;var%20bd=doc.body;bd.onselectstart=bd.oncopy=bd.onpaste=bd.onkeydown=bd.oncontextmenu=bd.onmousemove=bd.onselectstart=bd.ondragstart=doc.onselectstart=doc.oncopy=doc.onpaste=doc.onkeydown=doc.oncontextmenu=null;doc.onselectstart=doc.oncontextmenu=doc.onmousedown=doc.onkeydown=function%20(){return%20true;};with(document.wrappedJSObject||document){onmouseup=null;onmousedown=null;oncontextmenu=null;}var%20arAllElements=document.getElementsByTagName('*');for(var%20i=arAllElements.length-1;i>=0;i--){var%20elmOne=arAllElements[i];with(elmOne.wrappedJSObject||elmOne){onmouseup=null;onmousedown=null;}}var%20head=document.getElementsByTagName('head')[0];if(head){var%20style=document.createElement('style');style.type='text/css';style.innerHTML=%22html,*{-moz-user-select:auto!important;}%22;head.appendChild(style);}void(0);})();
下一篇: 没有了