如何解除网页禁止复制?

JavaScript018

如何解除网页禁止复制?,第1张

可以通过禁用浏览器的js功能来解除网页禁止粘贴,这里以谷歌浏览器为例。

1、同时按住键盘上的“Ctrl”键+“Shift”键+“Del”键打开谷歌浏览器的设置,然后点击页面底部的“高级”按钮:

/iknow-pic.cdn.bcebos.com/d01373f082025aafbd618226f5edab64024f1a8f"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/d01373f082025aafbd618226f5edab64024f1a8f?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/d01373f082025aafbd618226f5edab64024f1a8f"/>

2、点击“高级”按钮之后,在弹出的窗口中向下拉动,然后点击“网站设置”按钮:

/iknow-pic.cdn.bcebos.com/d31b0ef41bd5ad6e229298078fcb39dbb7fd3cf0"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/d31b0ef41bd5ad6e229298078fcb39dbb7fd3cf0?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/d31b0ef41bd5ad6e229298078fcb39dbb7fd3cf0"/>

3、在网站设置中找到“JavaScript”这一项,然后点击一项的按钮:

/iknow-pic.cdn.bcebos.com/9213b07eca8065389db958fe99dda144ac348288"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/9213b07eca8065389db958fe99dda144ac348288?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/9213b07eca8065389db958fe99dda144ac348288"/>

4、在弹出的页面中将JavaScript关闭,这时就解除了网页的禁止粘贴了:

/iknow-pic.cdn.bcebos.com/80cb39dbb6fd5266d5a7c0f9a518972bd507364a"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/80cb39dbb6fd5266d5a7c0f9a518972bd507364a?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/80cb39dbb6fd5266d5a7c0f9a518972bd507364a"/>

1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键,其实是禁止快捷菜单,因为不光右键可以弹出这个菜单,键盘上空格键右边的windows键也可以激活这个快捷菜单

<table border oncontextmenu=return(false)><td>no</table>可用于Table

2. <body onselectstart="return false">禁止选取、防止复制

3. onpaste="return false" 禁止粘贴

4. oncopy="return false" oncut="return false" 禁止复制和剪切

5. <input style="ime-mode:disabled">关闭输入法