Home > DeveloperSection > Forums > Problem in assign css on button control by javascript
Vikas Giri
Vikas Giri

Total Post:13

Posted on    January-11-2011 1:23 AM

 JavaScript JavaScript 

 1 Reply(s)
 1492  View(s)
Rate this:
we use one asp button control and apply css class for background color and forecolor on click event
problem in syntax how use it
please give the solution  
thanx in advance

Amit Singh

Total Post:103

Posted on    January-14-2011 2:08 AM

Check this code

<asp:button ID="Button1" runat="server" text="Button"  />
       <script type="text/javascript">        
               document.getElementById("Button1").style.backgroundColor = "red";
               document.getElementById("Button1").style.color = "Green";        

Don't want to miss updates? Please click the below button!

Follow MindStick