两个单选按钮(一个是,一个否 ),一个div层,实现点击隐藏,显示div

<script type="text/javascript">
function diva(){
	document.getElementById('div1').style.display="none";
};
function divb(){
	document.getElementById('div1').style.display="";
};
</script>
<div style="width:200px;height:200px;border:5px solid #000" id="div1"></div>
<input onClick="return diva()" type="button" value="是" />
<input onClick="return divb()" type="button" value="否" />

  

posted @ 2016-08-26 16:58  十二分努力  阅读(2367)  评论(0编辑  收藏  举报