单选钮控制文本框
请问
<input type= "radio " name= "typestate " value= "0 "> 国际
<input type= "radio " name= "typestate " value= "1 " checked> 国内
当我选择国际时 显示一个文本框填写,但我选择国内是,出现一个下拉菜单选择省会。选择其一时,其二就隐藏了。 请问大虾们怎么写js
------解决方案-------------------- <div>
<input type= "radio " name= "t " value= "0 " onclick= "arg() "> 国际
<input id= "u " style= "display:none "> <p>
<input type= "radio " name= "t " value= "1 " onclick= "arg() " checked> 国内
<select id= "g ">
<option value= " "> 请选择 </option>
</select>
<div>
<script language= "JavaScript ">
var arg = function (){
if (t[0].checked)
{
u.style.display = " " ;
g.style.display = "none " ;
}
else
{
u.style.display = "none " ;
g.style.display = " " ;
}
}
</script>