With the help of JavaScript we can add our favorite message with the marquee effect.
For that we create an object with a constructor, a special type of function that
prepares a new object for use by initializing the memory it takes up. Objects are
created by applying the new operator to their constructors. This operator causes the
constructor to which it is applied to create a brand-new object, and the nature of the
object that is created is determined by the particular constructor that is invoked.
Here we create a new setStatusmessage() object and place a reference to it in the
variable scroll. We define a function function scroller() which scrolls our message.
First we add blank spaces before the message and reduce one space per loop.
Step 1 : Refresh the status message with setTimeout ('scroller()',scroll.delay).
Step 2 : Shift the message with scroll.out = scroll.msg.substring(-scroll.pos,scroll.msg.length).
Step 3 : Create the message again ready to scroll.