Postado Dom 8 Ago 2010 - 10:07
Hi5 Iframe
Aqui esta mais uma forma de mudar a cor de fundo, neste caso com botões!
Botões mudar cor - opção 1
codigo:
- Código:
<FORM METHOD="POST" NAME="bgcolor">
<font color="silver">*
</font><input type="radio" name="bgcolor" ONCLICK="document.
bgColor='silver'">
<font color="lightslategray">*
</font><input type="radio" name="bgcolor" ONCLICK="document.
bgColor='lightslategray'">
<font color="azure">*
</font><input type="radio" name="bgcolor" ONCLICK="document.
bgColor='azure'">
<font color="lightgreen">*
</font><input type="radio" name="bgcolor" ONCLICK="document.
bgColor='lightgreen'">
<font color="lightblue">*
</font><input type="radio" name="bgcolor" ONCLICK="document.
bgColor='lightblue'">
<font color="white">*
</font><input type="radio" name="bgcolor" ONCLICK="document.
bgColor='white'">
</FORM>
Botões mudar a cor - Opção 2
codigo:
- Código:
<FORM>
<INPUT TYPE="button" VALUE="Cinza" ONCLICK="document.
bgColor='silver'">
<INPUT TYPE="button" VALUE="Rosa" ONCLICK="document.
bgColor='pink'">
<INPUT TYPE="button" VALUE="Amarelo" ONCLICK="document.
bgColor='yellow'">
<INPUT TYPE="button" VALUE="Verde" ONCLICK="document.
bgColor='lightgreen'">
<INPUT TYPE="button" VALUE="Azul" ONCLICK="document.
bgColor='blue'">
<INPUT TYPE="button" VALUE="Branco" ONCLICK="document.
bgColor='white'">
</FORM>
Botão de mudar a cor de fundo com o rato em cima:
- Código:
<A HREF="" ONMOUSEOVER ="document.bgColor=
'silver'">*</A>
<A HREF="" ONMOUSEOVER ="document.bgColor=
'lightslategray'">*</A>
<A HREF="" ONMOUSEOVER ="document.bgColor=
'azure'">*</A>
<A HREF="" ONMOUSEOVER ="document.bgColor=
'lightgreen'">*</A>
<A HREF="" ONMOUSEOVER ="document.bgColor=
'lightblue'">*</A>
<A HREF="" ONMOUSEOVER ="document.bgColor=
'white'">*</A>
Usuário escreve o codigo da cor de fundo que quer
- Código:
<FORM>
<INPUT TYPE="text" NAME="color" SIZE=18> <INPUT TYPE="button" VALUE="Color" ONCLICK="document.
bgColor=
(this.form.color.value)"> <INPUT TYPE="reset" NAME="cancel" VALUE="Reset">
</FORM>
FazGanza