Trying to add an onclick handler to my tabs, and can't seem to get the DOM selection right. Can you guys help?
<div id="tabstrip">
<ul>
<li id="a" class="selected"><a href="#">A</a></li>
<li id="b"><a href="#">B</a></li>
<li id="b"><a href="#">C</a></li>
</ul>
</div>
function initTabStrip()
{
var lis = document.getElementById('tabstrip').getElementsByTagName('li');
for (var i=0;i<items.length;i++)
{
var as = items[i].getElementsByTagName('a');
for (var j=0;j<as.length;j++)
{
as[j].onclick=function(){changeTab(items[i].id);return false}
}
}
}