Chinaunix首页 | 论坛 | 博客
  • 博客访问: 827820
  • 博文数量: 117
  • 博客积分: 2595
  • 博客等级: 少校
  • 技术积分: 1204
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-18 18:16
文章分类

全部博文(117)

文章存档

2013年(1)

2012年(2)

2011年(18)

2010年(95)

2009年(1)

分类: 系统运维

2010-08-07 20:47:11

点击按扭后显示DIV,当然这个DIV 就显示在按扭旁边,当鼠标移动到DIV上时无变化,当鼠标移出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>


阅读(1256) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~