日期:2014-05-17  浏览次数:21249 次

触发事件??
我有3个复选框,一个输入框,
<input   type= "radio "   name= "1 "   value= "1 "   >
<input   type= "radio "   name= "a "   value= "2 "   >
<input   type= "radio "   name= "a "   value= "3 "checked>
<input   name= "b "   >
我点击输入框,那3个复选框就隐藏,如何实现

------解决方案--------------------
<script language= "JavaScript " type= "text/javascript ">
<!--
function dis()
{
if (document.getElementById( "rd ").style.display== " ")
{
document.getElementById( "rd ").style.display = "none ";
}
else
{
document.getElementById( "rd ").style.display = " ";
}
}
//-->
</script>
</head>

<body>
<span id= "rd " style= "display: ">
<input type= "radio " name= "1 " value= "1 " >
<input type= "radio " name= "a " value= "2 " >
<input type= "radio " name= "a " value= "3 "checked>
</span>
<input name= "b " onclick= "dis(); ">
</body>