Wednesday, December 28, 2011

Scrolling Title in Browser title bar for blogspot

0



One of the most common uses of JavaScript is to create a scrolling message in the browser's status line. You can create a scrolling message using the string methods you have learned in this hour.
To begin, you'll need to define the message to be scrolled. You will use a variable called msg to store the message. To begin the script, initialize the variable (feel free to choose your own text for the message):



Steps to follow:

STEP #1
Log in to Blogger -> Layout -> Edit HTML and select the tick-box Expand Widget Templates
Then, find (CTRL+F) this code in the template

<head>

And immediately before it, paste this code:

<script type='text/javascript'>
//<![CDATA[
msg = "
--> TeachzWorld.blogspot.com <--";
msg = " --> TeachzWorld.blogspot.com <-- " + msg;pos = 0;
function scrollMSG() {
document.title = msg.substring(pos, msg.length) + msg.substring(0, pos); pos++;
if (pos > msg.length) pos = 0
window.setTimeout("scrollMSG()",200);
}
scrollMSG();
//]]>
</script> 

Add your title here ( --> TeachzWorld.blogspot.com <--


Now click Save Template 

0 comments:

Post a Comment

 
Design by Amjad Khan | Yahoo --> 03369148641@yahoo.com - Gmail --> h3art.patient@gmail.com | Teach With us About Hacking