![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
09/04/2002, 07:15
|
| | Fecha de Ingreso: febrero-2001
Mensajes: 292
Antigüedad: 24 años Puntos: 0 | |
Re: Cambiar el color de los links en el netscape Es largo, pero funciona.
Código:
<HTML>
<HEAD>
<TITLE>Ejemplo de enlaces</TITLE>
<STYLE TYPE="text/css">
.apagado { color: blue }
.encendido { color: red }
A:hover { color: red; font-size: 36px }
A:link { text-decoration: none; font-size: 36px }
A:visited { text-decoration: none; font-size: 36px }
</STYLE>
<SCRIPT Languaje="Javascript">
var Navegador = navigator.appName;
var Version = parseInt(navigator.appVersion);
var NS4 = (Navegador == "Netscape" && Version >= 4);
function muestraCadena(id, cadena){
if (NS4){
with (document[id].document){
open();
write(cadena);
close();
}
}
}
function cambiar(textoEnlace, nombreEnlace, enlace, claseActual,claseSiguiente, apagado){
if (!NS4){ return; }
var cadena = "<A CLASS='" + claseSiguiente + "' HREF='" + enlace + "'";
if (apagado){
cadena += " onMouseOut=\"cambiar(\'" + textoEnlace + "\', \'" +
nombreEnlace + "\', \'" + enlace + "\', \'" +
claseSiguiente +
"\', \'" + claseActual + "\', false)\">";
}
else{
cadena += " onMouseOver=\"cambiar(\'" + textoEnlace + "\', \'" +
nombreEnlace + "\', \'" + enlace + "\', \'" +
claseSiguiente +
"\', \'" + claseActual + "\', true)\">";
}
cadena += textoEnlace + "</A>";
muestraCadena(nombreEnlace, cadena);
}
</SCRIPT>
</HEAD>
<BODY>
<SPAN ID="enlace" STYLE="position: absolute; left: 182px;top: 40px">
<A CLASS="apagado" HREF="http://www.servidor.es/"
onMouseOver="cambiar('Enlace de Prueba', 'enlace', this.href, 'apagado', 'encendido', true)">
Enlace de Prueba
</A>
</SPAN><BR><BR>
</BODY>
</HTML>
<hr noshade size=1><img src="http://www.gograph.com/Images-8712/ClipArt/cat03.gif" height="50" border=0 align="absmiddle"> <font size="2" face="verdana" color="#000000"> bet[/CODE] |