禁用“保存并删除"使用javascript在所有浏览器中另存为选项 [英] Disable Save & Save As option in all Browsers using javascript

查看:74
本文介绍了禁用“保存并删除"使用javascript在所有浏览器中另存为选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在所有浏览器(例如Internet Explorer,Chrome,Firefox,Opera等)中禁用另存为"和保存"选项.我已经禁用了右键单击网页.代码在这里:

I want to disable Save As and Save options in all browsers (like Internet Explorer, Chrome, Firefox, Opera, etc). I have already disabled right click on my web page. The code is here:

    var message="Function Disabled!"; 
     function clickIE4()
       if(event.button==2){
          alert(message);
          return false; 
       }
    } 
    function clickNS4(e){
      if(document.layers||document.getElementById&&!document.all){
        if (e.which==2||e.which==3){  
          alert(message);
          return false; 
        } 
     } 
   } 
   if (document.layers){  
     document.captureEvents(Event.MOUSEDOWN);
     document.onmousedown=clickNS4;
   } 
   else if(document.all&&!document.getElementById){
       document.onmousedown=clickIE4; 
   }  
   document.oncontextmenu=new Function("alert(message);return false")

推荐答案

我想在所有浏览器中禁用另存为"和保存"选项,

I want to disable save as and save options in all Browsers,

你不能.

我已经禁用了右键单击

i have already disable right click

不是很有效.

DRM在旨在支持它的系统(例如DVD播放器)中不能很好地工作.在未设计为支持它的系统(例如Web浏览器)中,它的效率要低得多.

DRM doesn't work well in systems that are designed to support it (e.g. DVD players). It is much less effective in systems that are not designed to support it (e.g. web browsers).

这篇关于禁用“保存并删除"使用javascript在所有浏览器中另存为选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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