<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-…
<script type="text/javascript"> function doNothing(){ window.event.returnValue=false; return false; } </script> <body oncontextmenu="doNothing()"> 有时候我们在某些网站上不想用户点击右键进行复制等操作 在body里面处理下就好了 移动端长按会复制等选项可以使用下述的代码屏蔽这个功能,将下…
<script type="text/javascript"> function doNothing(){ window.event.returnValue=false; return false; } </script> <body oncontextmenu="doNothing()"> 有时候我们在某些网站上不想用户点击右键进行复制等操作 在body里面处理下就好了 移动端长按会复制等选项可以使用下述的代码屏蔽这个功能,将下…
koala 专注于个人技术分享 屏蔽f12审查 <script> document.onkeydown = function () { if (window.event && window.event.keyCode == 123) { alert("F12被禁用"); event.keyCode = 0; event.returnValue = false; } if (window.event && window.event.keyCod…
<script language="javascript"> //禁止按键F5 document.onkeydown = function(e){ e = window.event || e; var keycode = e.keyCode || e.which; if( keycode = 116){ if(window.event){// ie try{e.keyCode = 0;}catch(e){} e.returnValue = false; }else{// f…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-…
document.oncontextmenu = function(){return false;} 参考链接:js 屏蔽浏览器事件汇总…
//一.js屏蔽浏览器(IE和FireFox)的刷新功能 document.onkeydown=function() { if ((window.event.keyCode==116)|| //屏蔽 F5 (window.event.keyCode==122)|| //屏蔽 F11 (window.event.shiftKey && window.event.keyCode==121) //shift+F10 ) { window.event.keyCode=0; window.event…
RedHat 9.0 Linux下vi编辑器实现简单的粘贴复制剪切功能": 如果想把文件内的第三行内容黏贴到第十五行: 1.进入你的文件,(处于命令模式,而不是编辑模式) 2.将你的光标移到你的第三行的开头(用方向键) 3,按下v,(你发现切换到可视模式了),按方向键,知道选中你想要的内容 4.按y,再将光标移到第十四行末尾. 5.按p.完成 此方法可以用于多行的粘贴->复制 若想剪切->复制的话就更简单了(只能用于单行) 1.进入你的文件,(处于命令模式,而不是编辑模式) 2.将你…
javascript自定义浏览器右键菜单   在书上看到document对象还有一个contextmenu事件,但是不知为什么w3school中找不到这个耶... 利用这个特性写了个浏览器的右键菜单,感觉挺不错,呵呵... HTML部分(在<body></body>之间插入以下HTML): 查看代码 <div id="menu"> <ul> <li><a href="#">contextmenu…
js去掉浏览器右键点击默认事件 1.阻止整个页面所有的右击事件 document.oncontextmenu = function(){ return false;} 2.特定的区域/元素 document.getElementById("test").oncontextmenu = function(e){ return false;} 3.去掉以后给需要的区块加特定的事件 js: document.getElementById("test").onmousedo…
基于Window消息实现 class TextBoxExt:TextBox { private const int WM_RBUTTONDOWN = 0x0204; private const int WM_CHAR = 0x0102; protected override void WndProc(ref Message m) { switch (m.Msg) { case WM_RBUTTONDOWN: return;//屏蔽默认右键菜单 break; case WM_CHAR: int n…
JS 百度地图-右键菜单 /*-----------------标注右键删除-------------------------*/ var markerMenu = new BMap.ContextMenu(); markerMenu.addItem(new BMap.MenuItem('删除标注 ', function () { map.removeOverlay(marker); })) marker.addContextMenu(markerMenu);…
//屏蔽右键菜单 document.oncontextmenu = function (event) { if (window.event) { event = window.event; } try { var the = event.srcElement; if (!((the.tagName == "INPUT" && the.type.toLowerCase() == "text") || the.tagName == "TEXTA…
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false" onbeforecopy="return false" onmouseup=document.selection.empty() oncopy=document.selection.empty() onselect=document.sele…
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> </head> <body> <script> //oEvent.cancelBubble=true;//取消事件冒泡 // 如果你想实现按下就连续动,可以onkeydown后,起一个 var it =…
2015-03-02 更新文章,由于需求修改,更改了flexpaper插件,故增加第9.10.11小节,下载代码时请注意. 先废话几句.最近用到文档在线浏览功能,之前用的是print2flash(一个工具,文档直接转flash,自带翻页搜索等一系列功能),由于无法与js进行交互,所以改用flexpaper. 由于之前没接触过Flex,了解不多,所以文章难免有不合适的地方.希望各位给予指正. 首先感谢ajava.org的mark,一系列文章有很多的帮助,少走很多弯路. 开发工具:1.Adobe F…
//禁用右键菜单 document.oncontextmenu = function(){ event.returnValue = false; } //禁用选取内容 document.onselectstart = function() { event.returnValue = false; } //禁用复制 document.oncopy = function() { event.returnValue = false; } //禁用键盘中的ctrl.alt.shift document.…
document.oncontextmenu = function(e) { return false; } document.onmousedown = function(e) { switch(e.button) { case 0: console.log("鼠标左键") break; case 1: console.log("鼠标中间"); break; case 2: console.log("鼠标右键"); break; default…
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>javascript右键菜单</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>…
http://www.cnblogs.com/del/archive/2008/10/25/1319318.html TApplicationEvents.OnMessage 的第二个参数 Handled 如果是 True, 表示消息已经处理过了, 到此为止. unit Unit1; interface uses   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,   Dialogs, AppE…
要做一个IE右键浏览器插件,得3步走. 第一,在IE右键菜单上添加自定义菜单名称,是通过注册表实现的,如下: string regkey = @"Software\Microsoft\Internet Explorer\MenuExt\KnowledgeSave"; string scriptPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"getcurrenturl.htm"); Regist…
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>自定义右键菜单</title> <style> body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{ m…
//js 屏蔽 window.document.oncontextmenu = function () { event.returnValue = false; }//屏蔽鼠标右键 window.document.onselectstart = function () { event.returnValue = false; }//屏蔽鼠标选择 window.window.onhelp = function (){return false } //屏蔽F1帮助 window.document.o…
今天用到spreadsheetGear 插件,然后右键有插件自己的菜单.都是英文的,而且还能打开新的窗体.嵌到程序里面,不太合适,所以着手屏蔽. 刚开始用的Mouse_up,虽然能捕获事件,但是没有KeyPress事件的Handled属性. 百度之,发现相对简单的方法. 1.先让窗体类继承IMessageFilter接口2.在构造函数中添加:Application.AddMessageFilter(this);3.在代码中加入: public bool PreFilterMessage(ref…
建立Installer安装类,如图: 代码如下: using Microsoft.Win32; using ResourceShare.UserClient.Common; using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Configuration.Install; using System.Diagnostics…
(如果本页面没有自动下载,请点这里下载) IE浏览器分享工具安装步骤:1.发起下载请求后,屏幕上会弹出文件保存对话框,将文件保存到您电脑本地的磁盘中 2.双击刚才下载的安装文件,将JiaThis_ShareTools.reg分享工具加入注册表,当出现提示时,请选择"是". 3.打开执行文件,选择“确定”.JiaThis分享工具为绿色软件,极易安装和卸载,不会给系统带来任何危害,请您放心使用. 4.安装完毕后系统会自定提示您“JiaThis_ShareTools.reg中包含的项和值已成…
我也是第一次接触这个功能,只需一行代码即可搞定,直译过来就是“屏蔽上下文菜单”,特此记录一下吧. document.oncontextmenu = () => false;…
//方法1: function stop() {    return false;}document.oncontextmenu = stop;//方法2: window.document.oncontextmenu = function(){  //alert('请不要点击鼠标右键!'); return false; }…
oncopy="return false;" onpaste="return false;" oncut="return false;"…