Tuesday, February 15, 2011

Change the size, color of multiple link buttons using function

 

Write this in javascript code---->

 

 

function change(lnk,evt)

    {

        if(evt.type == "mouseover")

        {

            lnk.style.color = "#8D8D8D";

            lnk.style.fontSize = "medium";

        }

        else if(evt.type == "mouseout")

        {

            lnk.style.color = "white";

            lnk.style.fontSize = "large";

        }

    }

 

 

 

Linkbutton code-->

 

 

<asp:LinkButton ID="lnkBtnPMessage" runat="server" Font-Bold="False"

          onmouseover="change(this,event)" onmouseout="change(this,event)"

          Font-Size="Large" ForeColor="#FBFBFB" Font-Names="Calibri"

           PostBackUrl="~/PresidentMessage.aspx">aaaaaaaa</asp:LinkButton>



No comments :

Post a Comment