Jump to content
Fórum Script Brasil
  • 0

Como Fazer Style="background-color: Do Script Abai


Guest Evandro Felipe

Question

Guest Evandro Felipe

Caros amigos,

Como fazer com que o checked fique true ao digitar e o style="background-color: do script abaixo fique da cor digita e não o formulario todo?

Desde já agradeco a ajuda.

Evandro Felipe.

<html>

<head>

<script language=javascript>

function gerarcor(formulario) {

document.bgColor=document.formulario.valorcor.value;

document.formulario.V12.checked.value=true;

}

</script>

<title>Cor do texto</title>

</head>

<body>

<form name=formulario method=post>

<table border="1" cellpadding="0" width="100%" bordercolor="#000000">

<tr>

<td width="1%">

<p align="center"><font size="1" face="Verdana"><input type="radio" value="V12" name="R1">Minha

cor:</font><br>

<font size="1" face="Verdana"><input type="text" name="valorcor" onKeyUp='return gerarcor(this)' size="9"></font></td>

<td width="23%">

<p align="center"><font size="1" face="Verdana"><input type="text" name="ccor" size="4" style="background-color: document.formulario.valorcor.value"></font></td>

</tr>

</table>

<table border="0" cellpadding="0" width="100%">

<tr>

<td width="100%">

<p align="left"><font size="1" face="Verdana">No campo minha cor, digite

números para gerar sua cor.</font></td>

</tr>

</table>

</form>

</body>

</html>

Link to post
Share on other sites

2 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Cloud Computing


  • Forum Statistics

    • Total Topics
      148691
    • Total Posts
      644524
×
×
  • Create New...