哪位超级高手可以给该该啊!!!!!!!!!

xiaoban 2002-10-25 04:00:11
帮我把以下的代码该为鼠标右键的效果。
就是随便在页面哪里电极鼠标右键,就象例子程序中的鼠标指到123上连接的效果,谢谢!!!!!!!!!!!!!!!

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<script>
var thefont
var i=0,j=0
var thefonts=new Array()
function showit(obj){
thefont=obj
e=event.srcElement
t=e.offsetTop;
l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;}
tips.style.display=""
tips.style.left=l+event.srcElement.offsetWidth
tips.style.top=t+event.srcElement.offsetHeight
expan()
}
function hideit(){
tips.style.display="none"
tips.style.width=0
tips.style.height=0
tips.innerHTML=""
i=0
j=0
}
function showmessage(){
thefonts=thefont.split("")
addfont()
}
function addfont(){
if(j<thefonts.length){
tips.innerHTML="<font color=black>"+tips.innerText+"</font><font color=white>"+thefonts[j]+"</font>"
setTimeout("addfont()",50)
}
j++
}
function expan(objs){
if(i<150){
tips.style.width=i*2
tips.style.height=i*1
setTimeout("expan()",10)
}
else
if(i==150)
showmessage()
i++
}
</script>
<style type=text/css>
a {font-size:14px;color:#666666;font-family:"tahoma";text-decoration: none}
span{font-size:12px;color:black;font-family:Verdana;border:1 solid gray}
</style>
<a href="#" onmouseover="showit('123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123.')" onmouseout=hideit()>123</a>
<span id=tips style="position:absolute;width:0px;height:0px;background:#cccccc;display:none;filter: Alpha(opacity=60)"></span>

</body>
</html>
...全文
27 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
孟子E章 2002-10-25
  • 打赏
  • 举报
回复
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body ondblclick="hideit()" onclick="showit('123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123.')">
<script>
var thefont
var i=0,j=0
var thefonts=new Array()
function showit(obj){
thefont=obj
e=event.srcElement
t=e.offsetTop;
l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;}
tips.style.display=""
tips.style.left=event.clientX
tips.style.top=event.clientY
expan()
}
function hideit(){
tips.style.display="none"
tips.style.width=0
tips.style.height=0
tips.innerHTML=""
i=0
j=0
}
function showmessage(){
thefonts=thefont.split("")
addfont()
}
function addfont(){
if(j<thefonts.length){
tips.innerHTML="<font color=black>"+tips.innerText+"</font><font color=white>"+thefonts[j]+"</font>"
setTimeout("addfont()",50)
}
j++
}
function expan(objs){
if(i<150){
tips.style.width=i*2
tips.style.height=i*1
setTimeout("expan()",10)
}
else
if(i==150)
showmessage()
i++
}
</script>
<style type=text/css>
a {font-size:14px;color:#666666;font-family:"tahoma";text-decoration: none}
span{font-size:12px;color:black;font-family:Verdana;border:1 solid gray}
</style>
<a href="#">123</a>
<span id=tips style="position:absolute;width:0px;height:0px;background:#cccccc;display:none;filter: Alpha(opacity=60)"></span>

</body>
</html>

87,955

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧