SoFunction
Updated on 2025-02-28

How to implement scrolling text description when hovering on a picture with js

<html>
<title>JS implements scrolling text description when hovering on pictures</title>
<body>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function showtip2(current,e,text){
  if (&&=="complete"){
    .='<marquee style="border:1px solid black">'+text+'</marquee>'
    .=++10
    .=++10
    .="visible"
}
  else if (){
    document.('<b>'+text+'</b>')
    document.()
    document.=0
    currentscroll=setInterval("scrolltip()",100)
    document.=+10
    document.=+10
    document.="show"
}
}
function hidetip2(){
  if ()
    .="hidden"
    else if (){
    clearInterval(currentscroll)
    document.="hidden"
}
}
//  End -->
</script>
<div style="position:absolute;visibility:hidden;clip:rect(0 150 50 0);width:150px;background-color:gold;z-index:10"></div>
<div align="CENTER" name="divTest" onMouseover="showtip2(this,event,'Welcome to me');" onMouseout="hidetip2();" STYLE="cursor: hand">
<TABLE border="0" cellpadding="0" cellspacing="0"><TR><TD COLSPAN="7">
<img SRC="/images/" BORDER="0" style="cursor:pointer;"/>
</TABLE>
</div>
</body>
</html>