<INPUT id="button1" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; WIDTH: 26px; BORDER-BOTTOM: medium none; HEIGHT: 17px; BACKGROUND-COLOR: #d4ecf5;CURSOR: hand"onclick="top.location='admin_login.aspx'" type="button" value="退出" name="button1">中,怎么样可以做到当鼠标移动到文字的地方时,让文字变色,移开又变回原来的颜色?

解决方案 »

  1.   

    给你一个例子参考ImageButton鼠标效果:
    你可以添加个imagebutton控件如下<asp:ImageButton id="ImageButton1" runat="server" Height="36px" Width="130px" ImageUrl="images/plmm.gif"></asp:ImageButton>然后在page_load事件里写注册JS代码ImageButton1.Attributes.Add("onmousemove", "javascript:document.all.ImageButton1.src='images/plmm1.jpg';")
            ImageButton1.Attributes.Add("onmouseout", "javascript:document.all.ImageButton1.src='images/plmm.gif';")这样就可以了!
      

  2.   

    这个我会,我是问button行不行,行的话给个参考
      

  3.   

    <html>
    <head>
    <meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
    <script language="javascript" for="btnExit" event="onmouseover">
    btnExit.style.color = "red";
    </script>
    <script language="javascript" for="btnExit" event="onmouseout">
    btnExit.style.color = "blue";
    </script>
    </head>
    <body>
    <form>
    <INPUT id="btnExit" type="button" value="退出" name="button1" style="COLOR: blue">
    </form>
    </body>
    </html>
      

  4.   

    不知道怎么的,给 input-button 直接加上 onmouseover / onmouseout 属性不能运行.