sábado, 19 de diciembre de 2009

Cambiar color de boton (input) en Html

<html>
<head>
<title> Cambiar colores </title>

<style type="text/css">

input { font-family: Tahoma, Verdana, Arial; font-size: 11px; color: #FFFFFF; background-color: #7F99D4; border: #000099; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; cursor: hand}
</style>

<script language="JavaScript">
<!--
function cambiar(b,bg,tx){
b.style.backgroundColor = bg;
b.style.color = tx;

}
//-->
</script>
</head>
<body>

<input type="button" name="bot" value="Mi Boton" onMouseOver="cambiar(this,'#CCAAFF','#000000')" onMouseOut="cambiar(this,'#7F99D4','#FFFFFF')"><br>
</body>
</html>

No hay comentarios:

Publicar un comentario