var oInterval = true;
function fnStartInterval(){
if(oInterval==true)
{
oInterval = window.setInterval("fnRecycle()",1000); //1000毫秒
oInterval = false;
}}
function fnRecycle(){
//写层的隐藏
}
试试
function fnStartInterval(){
if(oInterval==true)
{
oInterval = window.setInterval("fnRecycle()",1000); //1000毫秒
oInterval = false;
}}
function fnRecycle(){
//写层的隐藏
}
试试
onmouseover的时候显示div
onmouseout的时候隐藏div
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function showDiv(state)
{
document.all.dv.style.display=state;
}
</script>
</head><body>
<div style=" z-index:0;width:222px;height:200px; display:none;position:absolute; top:0px;left:0px; background-color:#99CC66;" id="dv">
层</div>
<div style=" z-index:1; position:absolute; top:5px;left:5px;" >
<img src="http://community.csdn.net/logo/Images/eye001.gif" onmouseover="showDiv('block');" onmouseout="showDiv('none');" /></div>
</body>
</html>
还要注意一点,style里的z-index,小的在后面