在Mozilla Firefox中禁用选择,复制和粘贴HTML页面的内容 [英] Disable select, copy and paste of the content of HTML pages in Mozilla Firefox

查看:102
本文介绍了在Mozilla Firefox中禁用选择,复制和粘贴HTML页面的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Mozilla Firefox中禁用对HTML页面内容的选择,复制和粘贴.我已经使用jQuery和JavaScript禁用了右键单击并复制,选择,粘贴HTML页面的内容,并且它在IE和Chrome中可以正常工作,但是在Mozilla Firefox中无法正常工作.

I want to disable select, copy and paste of the content of HTML pages in Mozilla Firefox. I have used jQuery and JavaScript to disable right-click and copy, select, paste of the contents of HTML pages and it's working fine in IE and Chrome, but not working properly in Mozilla Firefox.

我们可以在Mozilla Firefox中禁用复制,粘贴选项吗?有什么建议吗?

Can we disable copy, paste option in Mozilla Firefox? Any suggestions?

推荐答案

尝试进行块选择的第一项工作,然后在文本区域和输入字段中选择第二项.

Try this first work for block select and second allow to select in textarea and input field.

html,body{
        -webkit-user-select: none;
        -moz-user-select: -moz-none;
        -ms-user-select: none;
        user-select: none;
        -khtml-user-select: none;
    }
    input, textarea{
        -webkit-user-select:  text !important;
        -moz-user-select:  text !important;
        -ms-user-select: text !important;
        user-select: text !important;
        -khtml-user-select: text !important;
    }

这篇关于在Mozilla Firefox中禁用选择,复制和粘贴HTML页面的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆