Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/10/2007, 22:05
Avatar de seoista
seoista
 
Fecha de Ingreso: septiembre-2003
Ubicación: Pues leyéndote
Mensajes: 1.076
Antigüedad: 20 años, 7 meses
Puntos: 59
Re: Enlazar javascript con html

Cita:
<script language="JavaScript1.2">
var message="<a href='destino.html'>¡ NOTICIAS DE ULTIMA HORA !</a>"
var neonbasecolor="blue"
var neontextcolor="red"
var flashspeed=100 //in milliseconds

///No need to edit below this line/////

var n=0
if (document.all){
document.write('<font color="'+neonbasecolor+'">')
document.write('<font size="6">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight">'+message.charAt(m)+'</span>')
document.write('</font>')

//cache reference to neonlight array
var tempref=document.all.neonlight
}
else
document.write(message)

function neon(){

//Change all letters to base color
if (n==0){
for (m=0;m<message.length;m++)
tempref[m].style.color=neonbasecolor
}

//cycle through and change individual letters to neon color
tempref[n].style.color=neontextcolor

if (n<tempref.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",1500)
return
}
}

function beginneon(){
if (document.all)
flashing=setInterval("neon()",flashspeed)
}
beginneon()


</script>
Hola frijolerou, el efecto no va como quiere maribajar (¡y también yo!), en la página web sale así:

<a href='destino.html'>¡ NOTICIAS DE ULTIMA HORA !</a>

Hace el efecto, pero tal como lo pongo aquí arriba, o sea, completo y sin dar opción a enlazar.

Saludos
__________________
· No contesto por M.P.