Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Raphael

Efeito em Formulario

Recommended Posts

Olá pessoal..

 

Estou usando um efeito para mudar de cor os campos de um formuario...

Estou usando o metodo getElementById(); para reconhecimento dos estilos CSS.

 

porem a funcção que estou usando para os metodos não esta funcionando nem por decreto, ai vai ela:

 

<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>TEste</title><link href="estilos/estilo.css" rel="stylesheet" type="text/css" /><style>.fundo_cadastro{	position:absolute;	left:314px;	top:12px;	font-family:"Trebuchet MS";	font-size:12px;	width:400px;}.menu2{	position:absolute;	left:444px;	top:152px;	width:369px;	height:182px;	z-index:1;	font-family:Verdana, Arial, Helvetica, sans-serif;	color:#004B6F;	font-size:12px;	font-weight:bold;}.rotulo1{position:relative;left:25px;}/*estilo caixa*/input.cxDentro{  background-color:#cbf5ca;  border-style:solid;  border-color:#6e848f;  border-width:1px;  font-family:arial, helvetica, sans-serif;  font-size:10px;  color: #000000;	}input.cxFora{  background-color:#e7eff7;  border-style:solid;  border-color:#cbdadc;  border-width:1px;  font-family:arial, helvetica, sans-serif;  font-size:10px;  color: #000000;}</style><script>function inputAmeba(opc, campo){	if(opc){  document.getElementById(campo).style.backgroundColor = "#e7eff7";  document.getElementById(campo).style.borderStyle = "solid";  document.getElementById(campo).style.borderCcolor = "#cbdadc";  document.getElementById(campo).style.borderWidth = "1px";  document.getElementById(campo).style.fontFamily = "arial, helvetica, sans-serif";  document.getElementById(campo).style.fontSize = "10px";  document.getElementById(campo).style.color = "#000000";  	}	else	{  document.getElementById(campo).style.backgroundColor = "#cbf5ca";  document.getElementById(campo).style.borderStyle = "solid";  document.getElementById(campo).style.borderColor = "#6e848f";  document.getElementById(campo).style.borderWidth = "1px";  document.getElementById(campo).style.fontFamily =" arial, helvetica, sans-serif";  document.getElementById(campo).style.fontSize = "10px";  document.getElementById(campo).style.color = "#000000";  	}}</script></head><body><!-- Corpo da página --><div id="corpo_pagina"><table cellpadding="0" cellspacing="," border="0">   <form name="form1" id="form1" method="post" action="">  <tr>    <td align="right">nome:</td>    <td><input type="text" size="25" maxlength="30" name="nome" id="compo1" onmouseover="inputAmeba(true, nome)" onmouseout="inputAmeba(false, nome)" /></td>  </tr>  <tr>    <td>endereço:</td>  <td><input type="text" size="25" maxlength="60" name="endereço" class="cxDentro" /></td>  </tr>  <tr>    <td align="right">bairro:</td>  <td><input type="text" size="25" maxlength="60" name="bairro" id="rotulo" /></td>  </tr>   <tr>   	 <td align="right">cep:</td>  <td><input type="text" size="10" maxlength="10" name="cep" id="rotulo" /></td>   </tr>   <tr>   	 <td align="right">cidade:</td>  <td><input type="text" size="25" maxlength="60" name="cidade" id="rotulo" /></td>   </tr>   <tr>  <td align="right">estado:</td>  <td><input type="text" size="2" maxlength="2" name="estado" id="rotulo" /></td>      </tr> 	 <tr>  <td align="right">telefone:</td>  <td><input type="text" size="25" maxlength="12" name="telefone" id="rotulo" /></td>	</tr>   </form></table></div></body></html>

Se puderem me ajudar ficarei grato

 

Um abraço

 

Raphael :D

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.