problema con el evento onclick en una imagen
Publicado por shindoi (4 intervenciones) el 06/11/2008 15:51:40
no se porque en algunas compus, si me funciono el codigo cuando lo ejecuto en mozilla, pero en otras no. Creo que es la asociacion onclick, a ver si me pueden ayudar, es el siguiente codigo:
--------------------------
<html>
<head>
<script language="JavaScript">
function cambiafondo(color)
{document.bgColor = color}
</script>
</head>
<body>
<p>Web Personalizada</p>
<p>Elegir el color de fondo:</p>
<th scope="col"><img src="colores.JPG" width="31" height="31" onclick="cambiafondo('DC143C')"/></th>
<th scope="col"><img src="colores2.JPG" width="31" height="31" onclick="cambiafondo('FFFACD')"/></th>
<th scope="col"><img src="colores3.JPG" width="31" height="31" onclick="cambiafondo('87CEFA')"/></th>
<th scope="col"><img src="colores4.JPG" width="31" height="31" onclick="cambiafondo('8FBC8F')"/></th>
<th scope="col"><img src="colores5.JPG" width="31" height="31" onclick="cambiafondo('FFC0CB')"/></th>
</body>
</html>
----------------------
GRACIAS POR LA AYUDA XD!
--------------------------
<html>
<head>
<script language="JavaScript">
function cambiafondo(color)
{document.bgColor = color}
</script>
</head>
<body>
<p>Web Personalizada</p>
<p>Elegir el color de fondo:</p>
<th scope="col"><img src="colores.JPG" width="31" height="31" onclick="cambiafondo('DC143C')"/></th>
<th scope="col"><img src="colores2.JPG" width="31" height="31" onclick="cambiafondo('FFFACD')"/></th>
<th scope="col"><img src="colores3.JPG" width="31" height="31" onclick="cambiafondo('87CEFA')"/></th>
<th scope="col"><img src="colores4.JPG" width="31" height="31" onclick="cambiafondo('8FBC8F')"/></th>
<th scope="col"><img src="colores5.JPG" width="31" height="31" onclick="cambiafondo('FFC0CB')"/></th>
</body>
</html>
----------------------
GRACIAS POR LA AYUDA XD!
Valora esta pregunta


0