Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/07/2002, 13:11
Avatar de .
.
 
Fecha de Ingreso: mayo-2002
Ubicación: Tampico
Mensajes: 906
Antigüedad: 22 años
Puntos: 1
Re: Cambiar Css via HTML

Yo me se otra forma pero no modifica estilos, mas bien modifico propiedades de las etiquetas

si lo quieres ver copia y pega este código que hice, lo puedes modificar basandote en lo que ya esta echo, no es muy complicado

<p id="ejemplo" align="left">
<font color=red size=2 face=verdan id=fuente>
Texto que cambia paametros
</font>
</p>


<a href="" onclick="document.getElementById('ejemplo').s etAttribute('align', 'left'); return false;">
Align Left</a> &nbsp &nbsp

<a href="" onclick="document.getElementById('ejemplo').s etAttribute('align', 'center'); return false;">
Align Left</a> &nbsp &nbsp

<a href="" onclick="document.getElementById('ejemplo').s etAttribute('align', 'right'); return false;">
Align Right
</a>
<br>
<a href="" onclick="document.getElementById('fuente').se tAttribute('color', 'green'); return false;">
Color Verde
</a> &nbsp &nbsp
<a href="" onclick="document.getElementById('fuente').se tAttribute('color', 'blue'); return false;">
Color Azul
</a> &nbsp &nbsp
<a href="" onclick="document.getElementById('fuente').se tAttribute('color', 'gold'); return false;">
Color Dorado
</a> &nbsp &nbsp
<br>
<a href="" onclick="document.getElementById('fuente').se tAttribute('face', 'Arial'); return false;">
Tipo de Fuente Arial
</a> &nbsp &nbsp
<a href="" onclick="document.getElementById('fuente').se tAttribute('face', 'Verdana'); return false;">
Tipo de Fuente Verdana
</a> &nbsp &nbsp
<a href="" onclick="document.getElementById('fuente').se tAttribute('face', 'fixedsys'); return false;">
Tipo de Fuente Fixedsys
</a> &nbsp &nbsp
<br>
<a href="" onclick="document.getElementById('fuente').se tAttribute('size', '2'); return false;">
Tamaño 2
</a> &nbsp &nbsp
<a href="" onclick="document.getElementById('fuente').se tAttribute('size', '4'); return false;">
Tamaño 4
</a> &nbsp &nbsp
<a href="" onclick="document.getElementById('fuente').se tAttribute('size', '7'); return false;">
Tamaño 7
</a> &nbsp &nbsp