div隐藏属性
div隐藏属性
比较简单的实现.style.display就是控制层隐藏或显示的属性.
<html>
<body>
<script>
function show(){
document.getElementById("div").style.display="";
//alert(document.getElementById("div").style.display)
}
function hidden(){
document.getElementById("div").style.display="none";
//alert(document.getElementById("div").style.display)
}
</script>
<BODY>
<input name="name" type="button" onClick="show();" value="显示">
<div id="div" style="display: none" onMouseout="hidden();">
show it
</div>
</BODY>
</HTML>
本文来自博客园,作者:King-DA,转载请注明原文链接:https://www.cnblogs.com/qingmuchuanqi48/articles/15030344.html

浙公网安备 33010602011771号