Easrml

Fóruns sobre PHP, JavaScript, HTML, MySQLi, jQuery, Banco de Dados, CSS
Moderador: web
![]() |
0 |
<form name="form">
sim <input type="radio" name="sim" onClick="ativa('yes')">
não <input type="radio" name="nao" onClick="ativa('no')">
</form>
<div id='div' style='display:none'>
conteúdo
</div>
<script>
function ativa(valor){
var div = document.getElementById('div');
if(valor=="yes") {
document.form.sim.checked;
document.form.nao.checked=false;
div.style.display = 'block'
}
if(valor=="no") {
document.form.nao.checked;
document.form.sim.checked=false;
div.style.display = 'none'
}
}
</script>
![]() |
0 |
![]() |
0 |