Jump to content
Fórum Script Brasil
  • 0

Ocultar Campo Usando Um Rádio Do Formuário

Guest --Paulo Henrique --


Guest --Paulo Henrique --

Queria saber como faço pra ocultar um campode formulário, através de um campo (rádio) do mesmo formulário.

<input type="radio" value="Sim" checked name="strRendaComprometida"> <input type="radio" name="strRendaComprometida" value="Não">

<input type="text" name="strParcialRenda" size="20" value="">

Quando clicar no radio Não ocultar o campo strParcialRenda

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

<input type="radio" value="Sim" checked name="strRendaComprometida" onclick="document.getElementById('parcialRenda').style.display = 'block';"> 
<input type="radio" name="strRendaComprometida" value="Não" onclick="document.getElementById('parcialRenda').style.display = 'none';">
<div id="parcialRenda">strParcialRenda: <input type="text" name="strParcialRenda" size="20" value=""></div>
<input type="radio" value="Sim" checked name="strRendaComprometida" onclick="document.getElementById('strParcialRenda').disabled = false;"> 
<input type="radio" name="strRendaComprometida" value="Não" onclick="document.getElementById('strParcialRenda').disabled = true;">
strParcialRenda: <input type="text" name="strParcialRenda" size="20" value="">

Link to comment
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.

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.


  • Forum Statistics

    • Total Topics
    • Total Posts
  • Create New...