verificar se o Radiobuton está selecionado
Pessoal,
Como faço para verificar se o radiobutton está marcado?
<script language="vbscript">
Sub btnok_OnClick()
'Script para fugir do valor undefined no radio button.
vbsexo_testa = document.Form_1.sexo
vbsexo = ""
i = 0
'Do While i < vbsexo_testa.length
' vbsexo = vbsexo.value
' i = i + 1
'Loop
'alert(vbsexo)
if vbsexo = "" then
alert("Selecione uma das opções")
document.Form_1.sexo.focus
exit sub
end if
End sub
</script>
*<form method="POST" action="--WEBBOT-SELF--" name="Form_1">*
* <p><input type="radio" value="M" name="sexo"><input type="radio" value="F" name="sexo"></p>*
* <p> </p>*
* <p><input type="button" value="Enviar" name="btnok"></p>*
*</form>*Discussão (1)
Carregando comentários...