HTML代码
<ul class="touzi_xuan1" id="qixian">
<li>****: </li>
<li style="width: 18px;"> </li>
<li><a href="javascript:void(0);" onclick="searchPersonZi(this);" class="on">****</a></li>
<li><a href="javascript:void(0);" onclick="searchPersonZi(this);">****</a></li>
</ul>
javascript代码
function searchPersonZi(obj) {
jQuery(obj).parent().parent().find("a").removeAttr("class");
jQuery(obj).attr("class","on"); }