Java Script

Random Title Bar Message



Instructions: Paste this script anywhere in your HTML document. Change the blue text to add your messages. The purple text is optional for when you want more than 2 messages. You may remove it, change the message, or copy and paste it and increment the number in the [] to create 3, 4, or more messages.

Tested On: IE 6, Mozilla 1.3, Opera 7

<SCRIPT LANGUAGE="JavaScript">
  <!-- Hide this from older browsers
  // This script was written by Protoplasm
  // http://www.geocities.com/protoplasm72  var message = new Array ();
  var delay = 5000; // Sets the delay between switching messages
  var currMessage = 1;

  message[1] = "Your first message here";
  message[2] = "Your second message here";
  message[3] = "Your third message goes here";

  function changer() {
    document.title = (message[currMessage++]);
    setTimeout("changer()",delay);
    currMessage = ((currMessage >= message.length) ? 1 : currMessage);
  }

  changer ();

  // end hide -->
</SCRIPT>

Share

Thanks for reading my blog. If you like what I write, why not subscribe to my feed?

If you are busy, I can send the latest post to your email. Just subscribe to my email updates.

 

Enter your email address:

Delivered by FeedBurner

Discussion

No comments for “Random Title Bar Message”

Post a comment