Forum Moderators: open
suppose I have 3 DIVs with IDs
<div id="id1">A</div>
<div id="id2">B</div>
<div id="id3">C</div>
now i want to make a javascript function which takes inut a DIV ID and then Hide all DIVs whose ID isnt equal to supplied iD
i tried following but no luck.
[codes]
var objDiv=document.getElementsByTagName("DIV");
for (LC = 0; LC < objDiv.length; LC ++)
{
alert(objDiv[LC].Id);
}
[/codes]
any help pls?
Thanks