<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15" valign="top"> </td>
<td>
<ul class="tab_title_ul">
<li id="l3" runat="server" onclick="a('a1',this);" ><a href="#">bb</a></li>
<li id="l4" runat="server" onclick="a('a2',this);" ><a href="#">cc</a></li><li id="l4" runat="server" onclick="a('a3',this);" ><a href="#">cc</a></li>
<li id="l4" runat="server" onclick="a('a4',this);" ><a href="#">cc</a></li>
</ul>
</td>
</tr>
</table>
这是我的TAB,a1,a2...是层的ID,函数如下
function a(id,obj)
{
document.getElementById("a1").style.display = "none";
document.getElementById("a2").style.display = "none";
document.getElementById("a3").style.display = "none";
document.getElementById("a4").style.display = "none";
document.getElementById(id).style.display = "";
}
现在郁闷我的问题是我在层里面有个服务端按钮,我每次点一下TAB选中项都会变成第一个也就是A1.怎么样不让他变,保持现有的选中状态啊
<tr>
<td width="15" valign="top"> </td>
<td>
<ul class="tab_title_ul">
<li id="l3" runat="server" onclick="a('a1',this);" ><a href="#">bb</a></li>
<li id="l4" runat="server" onclick="a('a2',this);" ><a href="#">cc</a></li><li id="l4" runat="server" onclick="a('a3',this);" ><a href="#">cc</a></li>
<li id="l4" runat="server" onclick="a('a4',this);" ><a href="#">cc</a></li>
</ul>
</td>
</tr>
</table>
这是我的TAB,a1,a2...是层的ID,函数如下
function a(id,obj)
{
document.getElementById("a1").style.display = "none";
document.getElementById("a2").style.display = "none";
document.getElementById("a3").style.display = "none";
document.getElementById("a4").style.display = "none";
document.getElementById(id).style.display = "";
}
现在郁闷我的问题是我在层里面有个服务端按钮,我每次点一下TAB选中项都会变成第一个也就是A1.怎么样不让他变,保持现有的选中状态啊
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货