- 浏览: 338834 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
pacoson:
感谢楼主。请受小生一拜。
ANT预编译JSP -
zhuhongming123:
一楼的同学Lucene4.* 以上的 已经改成了Numeric ...
Lucene日期排序及组合查询 -
ywjk520:
RangeQuery在哪个包里?
Lucene日期排序及组合查询 -
willwen:
有个疑问,楼主,为何初始化bits 从txt读取已有的网址是直 ...
布隆过滤器(Bloom Filter)之java实例 -
yu_226528:
还不如没有呢
jFreeChart 在jsp页上实现简单的折线图、柱状图
<!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-Type" content="text/html; charset=gb2312" /> <title>鼠标右键菜单 </title> <style type="text/css"> body{ font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif; margin-left:0px; } #contextMenu{ /* The menu container */ border:1px solid #202867; /* Border around the entire menu */ background-color:#FFF; /* White background color of the menu */ margin:0px; padding:0px; width:175px; /* Width of context menu */ font-family:arial; font-size:12px; background-image:url('images/gradient.gif'); background-repeat:repeat-y; /* Never change these two values */ display:none; position:absolute; } #contextMenu a{ /* Links in the context menu */ color: #000; text-decoration:none; line-height:25px; vertical-align:middle; height:28px; /* Don't change these 3 values */ display:block; width:100%; clear:both; } #contextMenu li{ /* Each menu item */ list-style-type:none; padding:1px; margin:1px; cursor:pointer; clear:both; } #contextMenu li div{ /* Dynamically created divs */ cursor:pointer; } #contextMenu .contextMenuHighlighted{ /* Highlighted context menu item */ border:1px solid #000; padding:0px; background-color:#E2EBED; } #contextMenu img{ border:0px; } #contextMenu .imageBox{ /* Dynamically created divs for images in the menu */ float:left; padding-left:2px; padding-top:3px; vertical-align:middle; width: 30px; /* IE 5.x */ width/* */:/**/28px; /* Other browsers */ width: /**/28px; } #contextMenu .itemTxt{ float:left; width: 120px; /* IE 5.x */ width/* */:/**/140px; /* Other browsers */ width: /**/140px; } </style> <script type="text/javascript"> /************************************************************************************************************ (C) www.dhtmlgoodies.com, October 2005 This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website. Terms of use: You are free to use this script as long as the copyright message is kept intact. However, you may not redistribute, sell or repost it without our permission. Thank you! www.dhtmlgoodies.com Alf Magne Kalleland ************************************************************************************************************/ var myvalue; var contextMenuObj; var MSIE = navigator.userAgent.indexOf('MSIE')?true:false; var navigatorVersion = navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,'$1')/1; var activeContextMenuItem = false; function highlightContextMenuItem() { this.className='contextMenuHighlighted'; } function deHighlightContextMenuItem() { this.className=''; } function showContextMenu(e) { contextMenuSource = this; if(activeContextMenuItem)activeContextMenuItem.className=''; if(document.all)e = event; var xPos = e.clientX; if(xPos + contextMenuObj.offsetWidth > (document.documentElement.offsetWidth-20)){ xPos = xPos + (document.documentElement.offsetWidth - (xPos + contextMenuObj.offsetWidth)) - 20; } var yPos = e.clientY; if(window.document.body.scrollTop > 0) { yPos = (window.screen.Height) ? e.clientY + window.document.body.scrollTop -20 : e.clientY -20; } else if (window.pageYOffset) { yPos = (window.pageYOffset > 0) ? e.clientY + window.pageYOffset -20 : e.clientY -20; } else { yPos = e.clientY -20; } /* * */ contextMenuObj.style.left = xPos + 'px'; contextMenuObj.style.top = yPos + 'px'; contextMenuObj.style.display='block'; return false; } function hideContextMenu(e) { if(document.all) e = event; if(e.button==0 && !MSIE){ }else{ contextMenuObj.style.display='none'; } } function initContextMenu() { contextMenuObj = document.getElementById('contextMenu'); contextMenuObj.style.display = 'block'; var menuItems = contextMenuObj.getElementsByTagName('LI'); for(var no=0;no<menuItems.length;no++){ menuItems[no].onmouseover = highlightContextMenuItem; menuItems[no].onmouseout = deHighlightContextMenuItem; var aTag = menuItems[no].getElementsByTagName('A')[0]; var img = menuItems[no].getElementsByTagName('IMG')[0]; if(img){ var div = document.createElement('DIV'); div.className = 'imageBox'; div.appendChild(img); if(MSIE && navigatorVersion<6){ aTag.style.paddingLeft = '0px'; } var divTxt = document.createElement('DIV'); divTxt.className='itemTxt'; divTxt.innerHTML = aTag.innerHTML; aTag.innerHTML = ''; aTag.appendChild(div); aTag.appendChild(divTxt); if(MSIE && navigatorVersion<6){ div.style.position = 'absolute'; div.style.left = '2px'; divTxt.style.paddingLeft = '15px'; } if(!document.all){ var clearDiv = document.createElement('DIV'); clearDiv.style.clear = 'both'; aTag.appendChild(clearDiv); } }else{ if(MSIE && navigatorVersion<6){ aTag.style.paddingLeft = '15px'; aTag.style.width = (aTag.offsetWidth - 30) + 'px'; }else{ aTag.style.paddingLeft = '30px'; aTag.style.width = (aTag.offsetWidth - 60) + 'px'; } } } contextMenuObj.style.display = 'none'; document.documentElement.oncontextmenu = showContextMenu; document.documentElement.onclick = hideContextMenu; } function SelectText() { try{ var selecter=window.getSelection(); if(selecter!=null&&selecter.trim()!=""){ myvalue=selecter; } }catch(err){ var selecter; var s; if(navigator.userAgent.indexOf("MSIE")>0){ selecter=document.selection.createRange(); myvalue=selecter.text; }else if(navigator.userAgent.indexOf("Firefox")>0){ selecter=window.getSelection().getRangeAt(0); myvalue=selecter; } } } function CopyToText(){ document.getElementById('txt').value=myvalue; //document.all.txt.value=myvalue; } String.prototype.trim=function() { return this.replace(/(^\s*)|(\s*$)/g,""); } </script> </head> <body> <ul id="contextMenu"> <li><a href="http://www.sharejs.com"><img src="images/button.gif">Home</a></li> <li><a href="#" onclick="document.getElementById('htmlSource').style.display='block';return false">View HTML</a></li> <li><a href="#" onclick="CopyToText()">拷贝到文本区</a></li> <li><a href="#">Menu item 4</a></li> </ul> <input type="text" size=60 name="txt" id="txt"> <br> <script type="text/javascript"> initContextMenu(); </script> <span onClick="SelectText()">河中鱼类离奇死亡,下游居民频染怪病,沿岸植物不断变异,是残留农药?还是生化攻击?敬请关注今晚CCTV-10《科学探索》,即将播出的专题节目:《神秘的河边洗脚人--中国男足》</span> </body> </html>
- 鼠标右键.rar (4.2 KB)
- 下载次数: 0
发表评论
-
js跨域问题之跨域iframe自适应大小
2011-07-25 08:45 1150前几天做公司和开心网 ... -
判断浏览器类型
2011-01-05 15:47 817<script language="JavaS ... -
ie和火狐兼容问题(解决方案)
2011-01-05 15:40 14071. document.form.item 问题 (1)现 ... -
关于document.cookie的使用
2010-12-23 18:25 937设置cookie 每个cookie都是一个名/值对,可以把下 ... -
仿中华英才网城市选择
2010-07-09 15:19 1624<!DOCTYPE HTML PUBLIC " ... -
firefox兼容ie读取xml节点方法的解决方案实例
2010-07-09 15:14 2454<html> <head> < ... -
jQuery总结
2010-04-22 13:52 7191、关于页面元素的引用通过jquery的$()引用元素包括通过 ... -
实现文字高亮功能的两种解决方案(Javascript/Jquery)
2009-11-19 12:50 8360高亮功能主要是指对页面中指定区域的指定文字进行高亮显示,也就是 ... -
精通 JS正则表达式
2009-11-12 17:28 877精通 JS正则表达式 (精通?标题党 ) 正则表达式可以: • ... -
javascript错误代码对应手册
2009-06-18 22:54 1047JScript 运行时错误 JScript 运行时错误是指当 ... -
Javascript 操作select控件大全
2009-06-18 11:48 733Javascript 操作select控件大全(新增、修改、删 ... -
CSS全攻略
2009-06-18 11:37 698CSS全称Cascading Style Sheet。层叠 ...
相关推荐
C#WPF 右键菜单 显示 事件触发 测试通过 <!-- 设置右键菜单 --> 编辑"> <!-- 调用系统命令 --> <MenuItem Command="Copy"> <MenuItem Command="Cut"></MenuItem> <MenuItem Command="Paste"></MenuItem> ...
//右键菜单 CopyCell:TMenuItem;//复制单元格内容 CopyList:TMenuItem;//复制选中列内容 CopyLine:TMenuItem;//复制选中行内容 PastLine:TMenuItem;//粘贴#9分隔符数据 DerFiles:TMenuItem;//导出文件 ...
程序员使用cmd的时候还是比较多的,本工具实现了在任何目录下右键cmd,并自动cd到目录,非常好用,有需要的小伙伴可以试试。 使用,双击加入注册表就行,原理很简单,就是使用了Powershell和一些cd命令。
FF--IE (兼容) 数据直接添加到剪切板 function CopyContent(copy) { if (window.clipboardData) { window.clipboardData.setData("Text", copy); } else if (window.netscape) { netscape.security....
1.Enable Copy 插件可以破解掉网页中因网站开发者使用JavaScript脚本启动的网页禁止复制功能,如果是别的方式(比如网页上的文本使用flash插件载入来禁止用户复制、右键等功能)的时候,Enable Copy 插件的破解方法...
便捷的拖曳式操作,可以拖放一个或多个文件到来源,支持整合到鼠标右键菜单,通过右键直接快速复制,内置三种复制模式,支持不覆盖差分复制,按大小/日期差分复制,按最新日期差分复制,可调节缓存大小,支持文件...
Q-Copy是一个附加于系统的工具,只需对任何目录或文件按鼠标右键即会出现Q-Copy这个功能,这个功能可让你做拷贝、移动、分割文件等功能。它提供你更容易、更快速的方法拷贝和移动文件,而分割文件功能则可让你将较大...
js禁止右键 禁止复制代码 js禁止右键 禁止复制代码 js禁止右键 禁止复制代码
DeepCopy-ShallowCopy:DeepCopy&ShallowCopy
只使用鼠标右键,就能快速,方便的复制粘贴,而不需要点击鼠标右键。再选择复制或粘贴。
使用鼠标右键拖拽一些文件/夹到某个地方,或者右键单击它们时,在环境菜单中都会出现使用(CH)进行操作的菜单。 复制某些文件到剪贴板 (在资源管理器中选择一些文件,使用键盘按ctrl+C或在资源管理器环境菜单中选用...
datagrid copy & paste
FastCopy 主要包含下列功能: 1.完全支持拖曳操作,支持拖曳多个文件到来源中; 2.支持外壳整合,方便的让你利用右键菜单直接复制文件; 3.支持三种不同的 HDD 模式; 4.内建多种人性化的操作模式; 5.支持过滤,...
一个很简单的插件,安装后,鼠标右键多出来一个Copy Full Path,可以复制文件或目录的全名。很方便吧。
运行SYMFAC1.exe,选中所需要的图形,鼠标右键,COPY 2.打开IFIX软件,在工作台的画图界面,鼠标右键,粘贴。 所需要的图面就能在IFIX画面上显示出来。 另外,这个软件也可以放在别的支持矢量图形软件上进行粘贴...
10_numpy的_copy_&_deep_copy_(教学教程)
android微信支付接口demo 微信支付是大家常遇到的功能模块。希望对大家有所帮助!!!
软件介绍: FastCopy是一款应用于32-64位WINDOWS系统的文件快速复制工具,复制小文件时...而且安装后能直接集成到鼠标右键菜单中,方便你使用它来快捷进行文件复制。支持不同HDD模式,支持使用通配符及命令行操作。
CopyPath-添加“复制文件路径”到右键菜单的小软件 将压缩包内的copypath.dll解压到c:\windows\system32\ 运行命令:regsvr32.exe copypath.dll,安装完成 Copy Path支持以下六种形式的路径复制: 1. "C:\...