解决方法,不能直接写点击效果就要在超链接中加一个参数,根据参数的值去给变焦点的效果,实现方法如下:
<div class="vip_search">
<div class='vip_search1'>
<div class='vip_search1a' >
<ul class='texts'>
<li><a href="http://member.360duohui.com/member/infoEdit.do?mane=0">主页</a><span></span></li>
<li><a href="http://order.360duohui.com/myOrder/myOrder.do?mane=1">我的交易</a><span></span></li>
<li><a href="http://pay.360duohui.com/account/memberAccount.do?mane=2">我的账户</a><span></span></li>
<li><a href="http://member.360duohui.com/communication/message/reciveBox.do?mane=3">我的消息</a><span></span></li>
</ul>
</div>
<div class='vip_search1s search' >
</div>
</div>
</div>
</div>
<script>
var url = location.search; //获取url中"?"符后的字串
var theRequest = [];
if (url.indexOf("?") != -1) {
var str = url.substr(1);
strs = str.split("&");
for(var i = 0; i < strs.length; i ++) {
theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
}
}
$('.texts').find('li').eq(theRequest.mane).find('span').addClass('atsa');
</script>