本人做一个表单提交程序,要做一个按钮,正常时显示first.gif, 鼠标移到按钮和按下时显示second.gif. 但是imageButton 控件好像只能放一个图片.本人无计可施,请大家帮帮忙!

解决方案 »

  1.   

    用photoshop合成吧  呵呵
      

  2.   

    错了,用onmouseover="this.src='2.gif'"
      

  3.   

    用javascript实现,onmouseover和onmousedown事件换图片,或者用DW做容易一些。
      

  4.   

    重新指定:ImageButton1.ImageUrl 不就可以了。
      

  5.   

    ImageButton1.Attributes.Add("onmouseover","this.src='2.gif'")
      

  6.   

    <style>
    .button {
    font-size: 12px;
    width: 80px;
    height: 20px;
    background-image: url(../images/skin/but_bg.gif);
    border: none;
    padding-top: 1px;
    }
    .button1 {
    font-size: 12px;
    width: 60px;
    height: 20px;
    background-image: url(../images/skin/but_bg1.gif);
    border: none;
    padding-top: 1px;
    }
    .button-o {
    font-size: 12px;
    width: 80px;
    height: 20px;
    background-image: url(../images/skin/but_bg_o.gif);
    border: none;
    padding-top: 1px;
    }
    .button1-o {
    font-size: 12px;
    width: 60px;
    height: 20px;
    background-image: url(../images/skin/but_bg1_o.gif);
    border: none;
    padding-top: 1px;
    }
    </style>
    <asp:button onmouseup="this.className='button'" onmousedown="this.className='button-o'" id="btnSave" accessKey="T" onmouseout="this.className='button'" CssClass="button" Text=" 保存(S) " Runat="server"></asp:button></P>
      

  7.   

    激动地谢谢诸位兄弟的帮忙,问题顺利解决
    另外我没有DW和PhotoShop, 不要讽刺人家嘛,毕竟俺是新人啊.