Menu
Hi there
I’m working on a javascript, where i need to use a javascript variable for the id in a DIV.
i have a div like this
<div id=b1>xxx</div>
And then i have a javascript variable x.
Now i want to use this x to hide the div like:
<a href=# onclick=”b<the x variable>.style.visibilty=’hidden'”>
But i really dont know how to add the x variable to b so javascript reads it as b1 if x is 1.
I also tried with arrays. but the id cannot be:
<div id=b[1]>xx</div>
Please help, thanks ?