martes, 24 de noviembre de 2009

Cambiar un estilo (css) con Javascript (getElementByTagName)

Ejemplo:

function CargarEstilo()
{
var MiBody = document.getElementByTagName("body").item(0);
with(MiBody)
{
style.backgroundColor="black";
style.color = "white";
style.fontFamily="Arial";
}
}

No hay comentarios:

Publicar un comentario