- UID
- 18264
- 帖子
- 4244
- 精华
- 0
- 贡献
- 11
- 推广
- 0
- 有效BUG
- 0
- 来自
- 扭腰
- 注册时间
- 2006-9-3
|
2#
发表于 2008-3-25 23:25
| 只看该作者
- <script language="JavaScript">
- //CopyLink -- By Neo101
- //Version 1.0
- (function() {
- var x=document.images
- for(i=0;i<x.length;i++) {
- x[i].oncontextmenu=function() {
- if(event.shiftKey) {
- window.clipboardData.setData('Text',this.src)
- //window.status='复制图片链接: '+this.src
- return false
- }
- }
- }
- var x=document.links
- for(i=0;i<x.length;i++) {
- x[i].oncontextmenu=function() {
- if(window.event.ctrlKey) {
- window.clipboardData.setData('Text',this.href)
- //window.status='复制目标链接: '+this.href
- return false
- }
- }
- }
- }())
- </script>
复制代码 加两个//就注释掉了,或者加个定时器清除,没经过测试- <script language="JavaScript">
- //CopyLink -- By Neo101
- //Version 1.0
- (function() {
- var x=document.images
- for(i=0;i<x.length;i++) {
- x[i].oncontextmenu=function() {
- if(event.shiftKey) {
- window.clipboardData.setData('Text',this.src)
- window.status='复制图片链接: '+this.src
- setTimeout("window.status=''",1000)
- return false
- }
- }
- }
- var x=document.links
- for(i=0;i<x.length;i++) {
- x[i].oncontextmenu=function() {
- if(window.event.ctrlKey) {
- window.clipboardData.setData('Text',this.href)
- window.status='复制目标链接: '+this.href
- setTimeout("window.status=''",1000)
- return false
- }
- }
- }
- }())
- </script>
复制代码 |
|