This Domain(Admin5.com) is for Sale:

用JavaScript实现利用FLASH嵌入声音(2)

时间:2007-10-22  来源:不详  作者:林子


   var CurMenu = document.all(MenuID);

   //为避免闪烁,如果下拉菜单已经显示则不重画.

   if (IsDroped==true)

   {

   window.event.cancelBubble = true;

   return false;

   }

   window.event.cancelBubble = true;

   TempMenu = CurMenu;

   //计算下拉菜单的位置

   x = window.event.srcElement.offsetLeft window.event.srcElement.offsetParent.offsetLeft;

   x2 = x window.event.srcElement.offsetWidth;

   y = pad.offsetHeight;

   CurMenu.style.top = y;

   CurMenu.style.left = x;

   CurMenu.style.clip = "rect(0 0 0 0)";

   CurMenu.style.display = "block";

   //延时2毫秒后再显示菜单,保证ToolbarMenu.offsetHeight有值,避免从主菜单移向下拉菜单时下拉菜单消失.

   window.setTimeout("showMenu()", 2);

   return true;

  } copyright dedecms

  function showMenu()

  {

   y2 = y TempMenu.offsetHeight;

   TempMenu.style.clip = "rect(auto auto auto auto)";

   IsDroped =true;//下拉菜单已经显示

  }

  function hideMenu()

  {

   //如果在下拉菜单的范围之内移动则不隐藏.

   cY = event.clientY document.body.scrollTop;

   if (cY>=y && cY<y2 && event.clientX >= (x 5) && event.clientX <= x2 ||

   cY>1 && cY<y && event.clientX >= (x 5) && event.clientX <= x2-10)

   { window.event.cancelBubble = true; return;}

   //隐藏

   TempMenu.style.display = "none";

   window.event.cancelBubble = true;

   IsDroped =false;

  }

  </SCRIPT>

  <body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0> 织梦内容管理系统

  <DIV ID='menu' STYLE='position:absolute;background-color:white;width:100%;top:0;left:0;'>

   <DIV ID='pad' STYLE='position:relative;height:20;width:100%;font:bold 11pt 宋体;background-color:#007FFF;color:white;'>

看完这篇,您有何感觉呢?

文章评论

共有位Admini5网友发表了评论 查看完整内容

24小时热门信息