Sign in to follow this  
Luckxander

Inserir Campo No Formulário Com Radiobutton

Recommended Posts

Alguém sabe me dizer como faço para inserir um campo no formulário ao clicar no radio button ?

Seria na verdade um campo oculto, ao selecionar o botão rádio, o campo seria exibido.

Share this post


Link to post
Share on other sites
<script language="javascript">
function Exibir()
{
  if (document.getElementById("exibe").style.visibility == 'visible')  
    document.getElementById("exibe").style.visibility = 'hidden';
  else                
    document.getElementById("exibe").style.visibility = 'visible';
}

</script>
Selecione: <input type="checkbox" onclick="Exibir()" value="1">

<div id="exibe" style="visibility: hidden; onclick="Exibir()">
<input type="text" name="campo">
</div>

Share this post


Link to post
Share on other sites

Pessoal como faço para "escoder" o campo??

Usando um radio com a opção sim e não!

Edited by fsf

Share this post


Link to post
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   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.

Sign in to follow this