var statu = 3;
var whosnext = function () {
if ( statu = 3) {
aboutout();
} else if ( statu = 2) {
orbout();
} else if ( statu = 4) {
contactout();
}else {
caseout();
}
}
var aboutclick = function () {
whosnext();
statu = 3;
aboutin();
}
var contactclick = function () {
whosnext();
statu = 4;
contactin();
}
var orbclick = function () {
whosnext();
statu = 2;
orbin();
}
var caseclick = function () {
whosnext();
statu = 1;
casein();
}
html:
<ul class="list-inline nav_list">
<li onclick="caseclick()"><a href="#" onclick="caseclick()">案例</a></li>
<li onclick="orbclick()"><a href="#" onclick="orbclick()">服务</a></li>
<li onclick="aboutclick()"><a href="#" onclick="aboutclick()">关于</a></li>
<li onclick="contactclick()"><a href="#" onclick="contactclick()">联系</a></li>
</ul>
我想每次点击修改statu的值,但是好像statu没有变化一直是3