孤独雪鹰 发表于 2015-4-3 09:52:07

动态图像按钮样式(Hyper Text Component, .htc)

本帖最后由 wuyvzhang 于 2016-8-2 17:25 编辑 <br /><br />

   
   
   
   
   
   
   
   
   
   
      
   
   
   
   
      
   
   
   



    //Declaration
    var bEnabled=true;
    var objTag;
   
    //attach to events
    attachEvent("onmouseover",evtMouseOver);
    attachEvent("onmouseout",evtMouseOut);
    attachEvent("onmousedown",evtMouseDown);
    attachEvent("onmouseup",evtMouseUp);
    attachEvent("onclick",evtClick);

   
    //Initialize
    function init()
    {
      if (enabled)
      {
            element.src=normalMap;
            element.style.cursor="hand";
      }
      else
            element.src=disabledMap;
      
      if (tooltips)
            element.alt=tooltips;
      

      element.style.filter += "alpha(opacity=100)";
    }
            
    //event handler for mouse over
    function evtMouseOver()
    {
      if (event.srcElement != element) return;
      
      if (!bEnabled) return;
      
      if (transparency)
            element.filters.alpha.opacity=alpha;
      else
            element.src=mouseOverMap;
      
      if (tipsInStatus) window.status=tooltips;
                  
    }


    //event handler for mouse out   
    function evtMouseOut()
    {
      if (event.srcElement != element) return;
      if (!bEnabled) return;
      
      if (transparency)
            element.filters.item("alpha").opacity=100;
      else
            element.src=normalMap;
      if (tipsInStatus) window.status="";
    }

    //event handler for mouse down
    function evtMouseDown()
    {
      if (event.srcElement != element) return;
      if (!bEnabled) return;
      
      if (transparency)
            element.filters.item("alpha").opacity=100;
      else
            element.src=mouseDownMap;   
    }
   
   
    //event handler for mouse up   
    function evtMouseUp()
    {
      if (event.srcElement != element) return;
      if (!bEnabled) return;
   
      if (transparency)
            element.filters.item("alpha").opacity=100;
      else
            element.src=mouseOverMap;
    }
   
    //event handler for click
    function evtClick()
    {
      if (submitForm) eval(submitForm).submit();
      
    }
   
    //property changed for enabled
    function evtEnabledChanged(vValue)
    {
      if (vValue)
      {
            element.src=normalMap;
            element.style.cursor="hand";
      }
      else
      {
            element.src=disabledMap;
            element.style.cursor="normal";
      }

      bEnabled=vValue;
    }
   
    //property get for enabled
    function evtEnabledGet()
    {
      return bEnabled;
    }
   
    //property changed for tag
    function evtTagChanged(vValue)
    {
      objTag=vValue;
    }
   
    //property get for tag
    function evtTagGet()
    {
      return objTag;
    }



   
      
   
      




www.138334.com SO娱乐城:真_人.足球.彩票齐全| 开户送10元.首存送58元.手机可投ぼ注任何游戏顶级信用ぼ提现即时到账SO.CC
页: [1]
查看完整版本: 动态图像按钮样式(Hyper Text Component, .htc)