Jquery里的鼠标事件弹层特效

来源:互联网 发布:网络质量 编辑:程序博客网 时间:2024/05/01 00:38

  
  function MM_over(mmObj) {
  var mSubObj = mmObj.getElementsByTagName("div")[0];
  mSubObj.style.display = "block";
  mSubObj.style.backgroundColor = "#90d7ec";
 }
 function MM_out(mmObj) {
  var mSubObj = mmObj.getElementsByTagName("div")[0];
  mSubObj.style.display = "none";
  
 }

 

<div onmouseover="MM_over(this)" onmouseout="MM_out(this)" style="width:100px;position:relative;">鼠标移动到这里
  <div style="width:100px;height:100px;display:none;position:absolute;left:40px;top:15px;z-inde:5;"><p><a href="#"> 这是一个div</a></p></div>
          </div>

原创粉丝点击