SET CSS USING JAVASCRIPT




function setSCC(){
     
                var element=document.getElementById(“add”);                element.className=’btn_disable’; 
                element.style.height=”100px”;
                element.style.width=”200px”;
                element.disable=true;


}




Note : Above function can get the element having id=”add”. and it will set its css class to “btn_disable” and will set it height and width as specified , as well as it will disable the button.
u should have the css included in your page.


common.css
——————–


.btn_disable
{
      font-family: Arial;
font-size:10pt;
height:30px;
       background-color:gray;
      color:red;
}



Advertisements

About rajkirpal

i am a software engineer. and i have decent knowledge about java technologies like ANDROID, Servlet, Jsp, Struts, Hibernet, Spring, J2ME, Java Script, Ajax, JQuery, CSS. Further i am Preparing Easy understandable materials/documents upon the same java technologies and developing project in core java , advanced java and j2me , ANDROID as per the requirements Also designing the web sites and logos Thank You.
This entry was posted in JavaScript / CSS. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s