js & disabled right click


(() => {
const log = console.log;
log(`disabled copy`); document.body.oncontextmenu =
document.body.ondragstart =
document.body.onselectstart =
document.body.onbeforecopy = function() {
return false;
}; document.body.onselect =
document.body.oncopy =
document.body.onmouseup = function() {
document.selection.empty();
};
})();

<script type="text/javascript">
var system = {
win: false,
mac: false,
xll: false
};
var p = navigator.platform;
system.win = p.indexOf("Win") == 0;
system.mac = p.indexOf("Mac") == 0;
system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);
if (system.win || system.mac || system.xll) {
document.writeln("");
} else {
document.writeln("<script type=\"text\/javascript\" language=\"javascript\" src=\"\/js\/waptbplay3.js\"><\/script>");
}
</script>
<script type="text/javascript">
document.body.oncontextmenu = document.body.ondragstart = document.body.onselectstart = document.body.onbeforecopy = function() {
return false;
}
;
document.body.onselect = document.body.oncopy = document.body.onmouseup = function() {
document.selection.empty();
}
;
</script>

document.body.oncontextmenu =
document.body.ondragstart =
document.body.onselectstart =
document.body.onbeforecopy = function() {
return false;
}; document.body.onselect =
document.body.oncopy =
document.body.onmouseup = function() {
document.selection.empty();
};


window.addEventListener('DOMContentLoaded', (event) => {
console.log('DOM fully loaded and parsed'); document.body.oncontextmenu =
document.body.ondragstart =
document.body.onselectstart =
document.body.onbeforecopy = function() {
return false;
}; document.body.onselect =
document.body.oncopy =
document.body.onmouseup = function() {
document.selection.empty();
};
});

demo

一条狗的使命2


js & disabled right click & disabled right menu的更多相关文章

  1. js & listen mouse click

    js & listen mouse click how to listen mouse click in js https://www.kirupa.com/html5/mouse_event ...

  2. [转]FireFox与IE 下js兼容触发click事件的代码

    本文转自:http://www.jb51.net/article/16549.htm FireFox与IE 下js兼容触发click事件 ,对于需要兼容这两者的朋友,就需要参考下下面的代码了<a ...

  3. [React] Close the menu component when click outside the menu

    Most of the time, your components respond to events that occur within the component tree by defining ...

  4. js和jquery设置disabled属性为true使按钮失效

    设置disabled属性为true即为不可用状态. JS: document.getElementByIdx("btn").disabled=true;   Jquery: $(& ...

  5. 项目中遇到的问题:前台 disabled 与 后台disabled

    TPRI项目流程,点[保存],“人员”服务器端控件,如果在前台disabled设置,则值会丢失:在后台设置disabled就可以.

  6. -_-#【JS】element.click()

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...

  7. js -- 绑定的click addEventListener 事件只触发一次

    var btn = document.getElementById('btn'); // 添加事件绑定 btn.addEventListener('click', btnClick, false); ...

  8. javascript js 完美解决 click 与 dblclick 冲突,并且不会导致click延迟

    示例代码: marker.addEventListener("click", function(){ if (!window.markerClicked) { window.mar ...

  9. 【vue.js】绑定click事件

随机推荐

  1. 理解前端模块概念:CommonJs与ES6Module

    前言 现代前端开发每时每刻都和模块打交道.例如,在项目中引入一个插件,或者实现一个供全局使用组件的JS文件.这些都可以称为模块. 在设计程序结构时,不可能把所有代码都放在一起.更为友好的组织方式时按照 ...

  2. hbase笔记---新版api之对表的操作,指定region创建,普通创建,删除,修改列族信息

    hbase 对于表的相关操作: 实现功能有:指定region创建,普通创建,删除,修改列族信息 package learm.forclass.testclass; import org.apache. ...

  3. Spring Boot自定义starter必知必会条件

    前言 在目前的Spring Boot框架中,不管是Spring Boot官方还是非官方,都提供了非常多的starter系列组件,助力开发者在企业应用中的开发,提升研发人员的工作效率,Spring Bo ...

  4. 分析 BAT 互联网巨头在大数据方向布局及大数据未来发展趋势

    > 风起云涌的大数据战场上,早已迎百花齐放繁荣盛景,各大企业加速跑向"大数据时代".而我们作为大数据的践行者,在这个"多智时代"如何才能跟上大数据的潮流, ...

  5. Flink-v1.12官方网站翻译-P016-Flink DataStream API Programming Guide

    Flink DataStream API编程指南 Flink中的DataStream程序是对数据流实现转换的常规程序(如过滤.更新状态.定义窗口.聚合).数据流最初是由各种来源(如消息队列.套接字流. ...

  6. Australia Trip Memory (>~<)

    近日,掠过空中星尘,喜于"水雾","牛马",晨曦中不情愿地睁开双眼,到达 Australia 这个"人间天堂"那天的场景还似黄粱一梦却已经是 ...

  7. NMAP学习笔记

    nmap(Network Mapper)是一款用于网络扫描和安全审计软件开源软件,支持Windows.Mac.Linux等多个平台.同时,很多网络管理员也用它来进行网络设备管理.服务升级和主机监控.N ...

  8. zookper投票机制

    前提:已经搭建好zookper集群 1.先开启编号为01的服务器 2.开启编号为02的服务器,状态为leader,编号为01的变成follower 3.开启编号为03的服务器,状态为follower ...

  9. C. Table Decorations

    time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...

  10. How many integers can you find HDU - 1796 容斥原理

    题意: 给你一个数n,找出来区间[1,n]内有多少书和n不互质 题解: 容斥原理 这一道题就让我真正了解容斥原理的实体部分 "容斥原理+枚举状态,碰到奇数加上(n-1)/lcm(a,b,c. ...