How To Access An Element By Giving A Variable In JSP Using GetElementById?
I have the following code: var id1='Times'+another_variable; alert(document.getElementById(id1).className); Basically, I need to pass a variable in the getElementById, how do i do
Solution 1:
I was doing a small mistake with the id name. It was not able to find the Id of the element. Once I corrected the id variable, it started working!
Sorry guys, for bothering!!!
Post a Comment for "How To Access An Element By Giving A Variable In JSP Using GetElementById?"