- UID
- 58045
- 帖子
- 147
- 精华
- 0
- 贡献
- 0
- 推广
- 0
- 有效BUG
- 0
- 注册时间
- 2007-5-11
|
4#
发表于 2007-9-16 13:58
| 只看该作者
1.首先打开记事本,将下面的代码粘贴进去,然后保存,文件名为CopyImageUrl.inf。
程序代码
[Version]
Signature="$Chicago$"
Provider="MetaBuilders"
[DestinationDirs]
DefaultDestDir=10,"web"
[DefaultInstall]
AddReg=CopyImageUrl_AddReg
CopyFiles=CopyImageUrl_CopyFiles
[CopyImageUrl_CopyFiles]
CopyImageUrl.html
[CopyImageUrl_AddReg]
HKCU,"Software\Microsoft\Internet Explorer\MenuExt\复制图片地址",,0x00000000,"%10%\web\CopyImageUrl.html"
HKCU,"Software\Microsoft\Internet Explorer\MenuExt\复制图片地址","contexts",1,02
2.再次打开记事本,将下面的代码照着敲进去,然后保存,文件名为CopyImageUrl.html。
程序代码
<SCRIPT LANGUAGE="JavaScript" defer>
var parentWin = external.menuArguments;
var srcEvent = external.menuArguments.event;
var doc = parentWin.document;
var eventElement = doc.elementFromPoint ( srcEvent.clientX, srcEvent.clientY );
var cpb = parentWin.clipboardData;
var srcImage = eventElement;
var str = new String(srcImage.href.toString());
str = + str +
cpb.setData("Text",str.toString());
</SCRIPT> |
|