پیام متحرک در پایین صفحه مدل ۱
<html> <head> <title>Type Writer Status Bar</title> <script LANGUAGE="JavaScript"> <!-- var speed = 50 // decrease value to increase speed (must be positive) var pause = 2000 // increase value to increase pause var timerID = null var bannerRunning = false var ar = new Array() ar[0] = "Welcome... " ar[1] = "You have entered my mighty house of JavaScript... " ar[2] = "Take what you want... " ar[3] = "But beware of the guard dogs!!!! " var currentMessage = 0 var offset = 0 function stopBanner() { if (bannerRunning) clearTimeout(timerID) bannerRunning = false } function startBanner() { stopBanner() showBanner() } function showBanner() { var text = ar[currentMessage] if (offset < text.length) { if (text.charAt(offset) == " ") offset++ var partialMessage = text.substring(0, offset + 1) window.status = partialMessage offset++ timerID = setTimeout("showBanner()", speed) bannerRunning = true } else { offset = 0 currentMessage++ if (currentMessage == ar.length) currentMessage = 0 timerID = setTimeout("showBanner()", pause) bannerRunning = true } } // --> </script> </head> <body BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FF0000" VLINK="#000080" ALINK="#000080" onLoad="startBanner()"> </body> </html>