Estoy creando una funcion que me cambie el css:
Código html:
El opacity me cambia bien, pero el tamañono.Ver original
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> <!-- function $(id){ return document.getElementById(id); } function $css(id,ob){ for (at in ob) { if(at=="opacity"){ $(id).style.opacity=(ob[at]); $(id).style.MozOpacity=(ob[at]); $(id).style.KhtmlOpacity=(ob[at]); $(id).style.filter="alpha(opacity="+ob[at]+")"; }else{ $(id).setAttribute(at,""+ob[at]); } } } --> </script> </head> <body> <input type="button" onclick="$css('divT',{opacity:'0.8',height:'50px',width:'50px'})" value="Probar" /> </body> </html>
Gracias
Salu2
![Adios](http://static.forosdelweb.com/fdwtheme/images/smilies/adios.gif)