![]() |
#2
aspic2009-11-19 15:14
|
点击一次为: <a href="1.php?sort=yes">Press Here</a>
再点击一次为: <a href="1.php?sort=no">Press Here</a>
同样,再点击一次为: <a href="1.php?sort=yes">Press Here</a>
下面就循环了。
自己写了一个,但是实现不了。

<a id="enjoy" href="#" onclick="return fnGo(this);" >Click me</a>
<script>
function fnGo(o){
o.href = '?sort=yes' ;
document.getElementById("enjoy").onclick = 'return fnGo1(this)' ;
return true;
}
function fnGo1(b){
b.href = '?sort=no' ;
document.getElementById("enjoy").onclick = 'return fnGo(this)' ;
return true;
}
</script>
<script>
function fnGo(o){
o.href = '?sort=yes' ;
document.getElementById("enjoy").onclick = 'return fnGo1(this)' ;
return true;
}
function fnGo1(b){
b.href = '?sort=no' ;
document.getElementById("enjoy").onclick = 'return fnGo(this)' ;
return true;
}
</script>