WedForum

Texto en la barra de estado

Con este recurso podés incluir varios mensajes, novedades y noticias sobre tu sitio. Es una forma de destacar lo que quieras y también de agregar un efecto diferente a tu sitio.



<script LANGUAGE="JavaScript">
<!--
var speed = 10
var pause = 1500
var timerID = null
var bannerRunning = false
var ar = new Array()

ar[0] = "Ingresa aquí el primer texto "
ar[1] = "Ingresa aquí el segundo texto"
ar[2] = "Ingresa aquí el tercer texto"
ar[3] = "Ingresa aquí el cuarto texto"
ar[4] = "Ingresa aquí el quinto texto"

var message = 0
var state = ""
clearState()

function stopBanner() {
if (bannerRunning)
clearTimeout(timerID)
timerRunning = false
}

function startBanner() {
stopBanner()
showBanner()
}

function clearState() {
state = ""
for (var i = 0; i < ar[message].length; ++i) {
state += "0"
}
}

function showBanner() {
if (getString()) {
message++
if (ar.length <= message)
message = 0
clearState()
timerID = setTimeout("showBanner()", pause)
}
else {
var str = ""
for (var j = 0; j < state.length; ++j) {
str += (state.charAt(j) == "1") ? ar[message].charAt(j) : " "
}
window.status = str
timerID = setTimeout("showBanner()", speed)
}
}

function getString() {
var full = true
for (var j = 0; j < state.length; ++j) {
if (state.charAt(j) == 0)
full = false
}
if (full) return true
while (1) {
var num = getRandom(ar[message].length)
if (state.charAt(num) == "0")
break
}
state = state.substring(0, num) + "1" + state.substring(num + 1, state.length)
return false
}

function getRandom(max) {
var now = new Date()
var num = now.getTime() * now.getSeconds() * Math.random()
return num % max
}
// -->
</script>



Paso 2: Ingresa el siguiente código en la etiqueta <body> de tu página:

<Body onLoad="startBanner()">
Hoy hubo 11765 visitantes (20958 clics a subpáginas) ¡En WedForum!
Powered By WedForum | Hosted atPWG
Este sitio web fue creado de forma gratuita con PaginaWebGratis.es. ¿Quieres también tu sitio web propio?
Registrarse gratis