Suppose there is a RADIO{form}
button
- Radio: 1
- Radio: 2
When selecting the 1st item, any fields are added, while selecting another other fields.
With JS I'm not friends, who will tell?
Suppose there is a RADIO{form}
button
When selecting the 1st item, any fields are added, while selecting another other fields.
With JS I'm not friends, who will tell?
<p><input type='radio' name='radio' value='1' onclick="hideFields(true)" checked> 1)</p> <p><input type='radio' name='radio' value='2' onclick="hideFields(false)"> 2)</p> <div id='hidden_fields'> <p>Name: <input ></p> <p>Sex: <input ></p> </div> <script type='text/javascript'> document.getElementById('hidden_fields').style.display = 'none'; function hideFields(hide){ document.getElementById('hidden_fields').style.display = hide ? 'none' : 'block'; } </script>
101010
. She is lonely. Remember about it from time to time. - Nofate ♦Source: https://ru.stackoverflow.com/questions/131484/
All Articles