Program Code – Windows Scroll Bar

This code is written in HTML (HyperText Markup Language)and javascript. You have to run this program in internet explore 6.0 to see the result. Modern browsers won’t support this code window.status().

<html>
<head>
    <title>scroll</title>
</head>
<script language="javascript">
myMsg = "Welcome to LB Arts and Science College   "
i=0
function scrollMsg() 
{
    FrontPart = myMsg.substring(i,myMsg.length())
    BackPart = myMsg.substring(0,i)
    window.status = FrontPart + BackPart
    if (i < myMsg.length())
     {
        i++
    }
    else 
    {
        i = 0
    }
    myMsg=setTimeout("scrollMsg()",50)
}
window.onload= scrollMsg()
</script>
<body onload="scrollMsg()">
<h1> Scroll Message on Windows Status Bar</h1>
</body>
</html>

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.