js控制div显示隐藏

来源:互联网 发布:qwq是什么意思网络用语 编辑:程序博客网 时间:2024/05/17 05:14
<html><body><script>function show(){document.getElementById("div").style.display="";//alert(document.getElementById("div").style.display)}function hiddens(){document.getElementById("div").style.display="none";//alert(document.getElementById("div").style.display)}</script><BODY><input name="name" type="button" onClick="show();" value="显示"><input name="name" type="button" onClick="hiddens();" value="隐藏"><div id="div" style="display: none" ">show it</div></BODY></HTML>

0 0
原创粉丝点击