在MS Word或任何其他编辑器中复制和粘贴后,不允许编辑页面 [英] Page should not be allowed to be edited after copying and pasting in MS word or any other editor

查看:93
本文介绍了在MS Word或任何其他编辑器中复制和粘贴后,不允许编辑页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在asp.net中创建了一个网页.

我要保护此页面,在MS Word或任何其他编辑器中复制和粘贴后,不允许在该页面中进行编辑.任何打印屏幕,剪切,复制,粘贴功能都应超出要复制为图像而不是可编辑文本的html页面的高度.


任何人,请给我建议.

Hi all,

i have created one webpage in asp.net.

i want to protect this Page, in which page should not be allowed to be edited after copying and pasting in MS word or any other editor. Any print screen, cut, copy, paste function should aloow the html page to be copied as an image and not as texts which can be edited.


anybody,Please suggest me.

推荐答案

无法将文本显示为文本,不允许将其复制,但是一旦复制就不能更改.文本放在剪贴板上后,您将无法对其进行控制.我确实有一些想法供您思考.

我要做的第一件事就是看看为什么您要保护自己的文本.真的有必要吗?网站的重点是您共享信息.人们在某种程度上选择如何处理这些信息取决于他们.即使在技术上可行,他们仍然可以将数据转录到Word,然后进行操作.

如果您确实认为某些文本必须受到保护并且必须保持不变,则可以将该文本转换为图像.然后他们可以下载图像,但无法轻松地操纵文本.这是有关操作方法的提示:

将文本转换为图像 [
It is impossible to display text as text, allow it to be copies, but stop it from being changed once it is copied. Once the text is on the clipboard, you have lost control over it. I do have a couple ideas for you to think through though.

The first thing I would do would be to look at why you are trying to protect your text. Is it really necessary? The whole point of a website is that you are sharing information. What people choose to do with that information, to an extent, is up to them. Even if this were technically possible, they could still transcribe the data to Word and then manipulate it.

If you really feel that certain text must be protected and must remain unchanged, you could convert that text to an image. Then they could download the image but they couldn''t easily manipulate the text. Here is a tip on how to do that:

Convert Text to Image[^]

This isn''t a solution you want to do for your whole page, but it could work for sections that are going to remain static anyway.

You could also create a user agreement that has to be agreed to before the visitor can see your page. Something simple that says "I will not modify the text I see" or something to that effect.


这是不可能的,我只能禁用内容的选择,复制和粘贴

It is impossible, I have only Disable select, copy and paste of the content

//disable cut copy past
    var message = "";
    function clickIE() { if (document.all) { (message); return false; } }
    function clickNS(e) {
        if(document.layers || (document.getElementById && !document.all)) {
            if (e.which == 2 || e.which == 3) { (message); return false; }
        }
    }
    if (document.layers)
    { document.captureEvents(Event.MOUSEDOWN); document.onmousedown = clickNS; }
    else { document.onmouseup = clickNS; document.oncontextmenu = clickIE; }
     document.oncontextmenu = new Function("return false")

    //for disable select option
    document.onselectstart = new Function('return false');
    function dMDown(e) { return false; }
    function dOClick() { return true; }
    document.onmousedown = dMDown;
    document.onclick = dOClick;


这篇关于在MS Word或任何其他编辑器中复制和粘贴后,不允许编辑页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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