Dear all,
I have css class with height attribute
.Testclass
{
height:500px;
}
Here my requirement is
1. I need to get value of this height using javascript
2. assign to some javascript variable
How to get css class attribute value using javascript
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted Oct 29, 2012, 6:38 AM EDT
.Testclass
{
height:500px;
}
Added Css file link on .aspx page
Create an
Hello World;
Create a javascript function
Call it onload page
OUTPUT:
SIVARank #2,303 · 613 reputationPosted Oct 29, 2012, 7:13 AM EDT
i have only .js file & in that itself i need to create html file dynamically and i need to set css class for that.
so i can get attribute of that class.
how can i create html file dynamically using javascript?