要完成此效果需要兩個(gè)步驟
第一步:把如下代碼加入到區(qū)域中
第二步:把如下代碼加入到區(qū)域中
<script language="JavaScript1.2">
var enableeffect=true
var selection=new Array()
selection[0]='
LINK1'
selection[1]='
LINK2'
selection[2]='
LINK3'
selection[3]='
LINK4'
selection[4]='
LINK5'
if (document.layers)
document.dropmenu01.document.dropmenu02.visibility='show'
function dropit2(){
if (document.all){
dropmenu03.style.left=document.body.scrollLeft+event.clientX-event.offsetX
dropmenu03.style.top=document.body.scrollTop+event.clientY-event.offsetY+18
if (dropmenu03.style.visibility=="hidden"){
if (enableeffect)
dropmenu03.filters.revealTrans.apply()
dropmenu03.style.visibility="visible"
if (enableeffect)
dropmenu03.filters.revealTrans.play()
}
else{
hidemenu()
}
}
}
function dropit(e){
if (document.dropmenu03.visibility=="hide")
document.dropmenu03.visibility="show"
else
document.dropmenu03.visibility="hide"
document.dropmenu03.left=e.pageX-e.layerX
document.dropmenu03.top=e.pageY-e.layerY+19
return false
}
function hidemenu(){
if (enableeffect)
dropmenu03.filters.revealTrans.stop()
dropmenu03.style.visibility="hidden"
}
function hidemenu2(){
document.dropmenu03.visibility="hide"
}
if (document.layers){
document.dropmenu01.document.dropmenu02.captureEvents(Event.CLICK)
document.dropmenu01.document.dropmenu02.onclick=dropit
}
else if (document.all)
document.body.onclick=hidemenu
</script>