现在想解决的是,当鼠标到了一个ITEM上面的时候,有TIP提示。据说JAVASCRIPT实现,但是不知道如何实现?请高手指点

解决方案 »

  1.   

    增加一个层,然后添加onmouseover到dropdownlist上,使用document.getElementById('id').value;附一个显示层的代码:
    tPopWait=50;  //停留tWait毫秒后显示提示。
    tPopShow=6000;  //显示tShow毫秒后关闭提示
    showPopStep=20;
    popOpacity=95;
    fontcolor="#000000";
    bgcolor="#EDEDED";
    bordercolor="#007db5";//***************内部变量定义*****************
    sPop=null;curShow=null;tFadeOut=null;tFadeIn=null;tFadeWaiting=null;document.write("<style type='text/css' id='defaultPopStyle'>");
    document.write(".cPopText {background-color: " + bgcolor + "; color: " + fontcolor + "; border: 1px " + bordercolor + " solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
    document.write("</style>");
    document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");function showPopupText()
    {
     var o=event.srcElement;
     MouseX=event.x;
     MouseY=event.y;
     if (o.alt!=null && o.alt!="")
     {
      o.dypop=o.alt;
      o.alt="";
     }
     if (o.title!=null && o.title!="")
     {
      o.dypop=o.title;
      o.title="";
     }
     if (o.dypop!=sPop)
     {
      sPop=o.dypop;
      clearTimeout(curShow);
      clearTimeout(tFadeOut);
      clearTimeout(tFadeIn);
      clearTimeout(tFadeWaiting); 
      if (sPop==null || sPop=="")
      {
       dypopLayer.innerHTML="";
       dypopLayer.style.filter="Alpha()";
       dypopLayer.filters.Alpha.opacity=0; 
      }
      else
      {
       if(o.dyclass!=null) popStyle=o.dyclass 
       else popStyle="cPopText";
     
       curShow=setTimeout("showIt()", tPopWait);
      }
     }
    }
      

  2.   

    很有借鉴意义,但是还没做出来。郁闷中~~~~我的是服务器端的DROPDOWNLIST.每次加载的时候要给<OPION>加上属性
    现在<OPTION>上面加不到~~~请高手解决~~
      

  3.   

    不过还是要 很感谢 # NekChan的