![Pirata](http://static.forosdelweb.com/fdwtheme/images/smilies/pirate.png)
Como pasarle a un -atributo de un tag- el valor de una variable en la misma linea HTML
![Pensando](http://static.forosdelweb.com/fdwtheme/images/smilies/scratchchin.gif)
algo asi como.....
<img ...... ancho=this.width>
Espero no sea muy complicado.
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)
| ||||
<img src="mmc.gif" myPropiedad="" width="30px" id="prueba"> <!-- Inmediatamente despues de crear el objeto asignasla propiedad --> <script> document.all['prueba'].myPropiedad = document.all['prueba'].width; </script> Este ejemplo en caso de un tag de imagen, tambien es valido <img src="http://igomezcsc/mmc.gif" myPropiedad='' width="30px" id="prueba" onload="this.myPropiedad = this.width;"> Saludos
__________________ Yo tan sólo se, que no he senado |
| ||||
![]() ![]() <img src="" onload="this.ancho=this.width;width='50';" onmouseover="this.width=this.ancho;" onmouseout="this.width=50;"> ocurre una cosa curiosa ![]() ![]() ![]() ![]() Gracias amigo. ![]() Última edición por programeitor; 13/09/2005 a las 16:35 |