请问下面代码怎样加一个鼠标点击超连接的代码呢??谢谢~!
<script>
<!--
var imageheight=360
var imagewidth=480var cliptop
var clipbottom
var clipleft
var clipright
var clippoints
var tempo=100var stepx=0
var stepy=0
var timerfunction setValues() {
if (document.all) {
document.all.image.style.posLeft=400
document.all.image.style.posTop=150
document.all.imagecontent.style.posLeft=400
document.all.imagecontent.style.posTop=150
moveimage()
}
}function moveimage() {
if (stepx<=imagewidth || stepy<=imageheight) {
stepx=stepx+12
stepy=stepy+6
image.innerHTML="<span style='width:"+stepx+"px; height:"+stepy+"px;filter:alpha(opacity=0,finishopacity=100,style=2'></span>"
cliptop=0
clipbottom=stepy
clipleft=0
clipright=stepx
clippoints="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.imagecontent.style.clip=clippoints
timer=setTimeout("moveimage()",tempo)
}
else{
clearTimeout(timer)
timer=setTimeout("moveimage2()",tempo)
}
}function moveimage2() {
if (stepx>=0 || stepy>=0) {
stepx=stepx-12
stepy=stepy-6
image.innerHTML="<span style='width:"+stepx+"px; height:"+stepy+"px;filter:alpha(opacity=0,finishopacity=100,style=2'></span>"
cliptop=0
clipbottom=stepy
clipleft=0
clipright=stepx
clippoints="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.imagecontent.style.clip=clippoints
timer=setTimeout("moveimage2()",tempo)
}
else{
stepx=0
stepy=0
clearTimeout(timer)
timer=setTimeout("moveimage()",tempo)
}
}
<script>
<!--
var imageheight=360
var imagewidth=480var cliptop
var clipbottom
var clipleft
var clipright
var clippoints
var tempo=100var stepx=0
var stepy=0
var timerfunction setValues() {
if (document.all) {
document.all.image.style.posLeft=400
document.all.image.style.posTop=150
document.all.imagecontent.style.posLeft=400
document.all.imagecontent.style.posTop=150
moveimage()
}
}function moveimage() {
if (stepx<=imagewidth || stepy<=imageheight) {
stepx=stepx+12
stepy=stepy+6
image.innerHTML="<span style='width:"+stepx+"px; height:"+stepy+"px;filter:alpha(opacity=0,finishopacity=100,style=2'></span>"
cliptop=0
clipbottom=stepy
clipleft=0
clipright=stepx
clippoints="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.imagecontent.style.clip=clippoints
timer=setTimeout("moveimage()",tempo)
}
else{
clearTimeout(timer)
timer=setTimeout("moveimage2()",tempo)
}
}function moveimage2() {
if (stepx>=0 || stepy>=0) {
stepx=stepx-12
stepy=stepy-6
image.innerHTML="<span style='width:"+stepx+"px; height:"+stepy+"px;filter:alpha(opacity=0,finishopacity=100,style=2'></span>"
cliptop=0
clipbottom=stepy
clipleft=0
clipright=stepx
clippoints="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
document.all.imagecontent.style.clip=clippoints
timer=setTimeout("moveimage2()",tempo)
}
else{
stepx=0
stepy=0
clearTimeout(timer)
timer=setTimeout("moveimage()",tempo)
}
}
解决方案 »
- javascript问题
- tomcat如何做websphere那种共享库引用
- java web隐式对象问题..求助...!!
- JSP问题
- 一个 asp 写的天气预报小偷的程序想改成 Java 的程序 ,有高手帮忙么?我有多少分给多少分
- java+nutch+lucene技术群:89707680
- TOMACT5.0+AXIS1_2的问题?(急,在线等)
- 请问在网页里面的activex控件如何能控制该网页里面的脚本呢?
- 如何实现在一个Web项目中背景音乐持续播放!!!!急求!!!
- 高分求答案!来者有分!
- jsp:forward 与forward();方法 我这样理解对吗???
- 在JSP中传递多个参数
onmousedown里放置按下鼠标时触发的事件;onmousedown里放置放开鼠标时触发的事件;onmousemove里放置按下鼠标且移动过程中触发的事件
格式如onmousemove="moveimage();"
具体触发什么事件就调用相应的JS方法