<div class="codetitle"> <span><a style="CURSOR: pointer" data="47027" class="copybut" id="copybut47027" onclick="doCopy('code47027')"><u>复代码</u></a></span> 代码如下:</div> <div class="codebody" id="code47027"> <br><html> <br><머리> <br><title>超简单上下翻</title> <br><script type="text/javascript" src="js/jquery.js"></script> <br></head> <br><본문> <br>简单上下翻,函数 <br><script type="text/javascript"> <br>function UpDown(What) { <br>var aList = $("#tab a"); <br>var oldnode = aList.get(0); <br>/* <br>*获取最后一个원분3种방법 <br>*/ <br>newnode = aList[aList.length - 1]; <br>newnode = aList.get(aList.length - 1); <br>newnode = $("#tab a:last"); <br>if (What == "up") return $(oldnode).before(newnode); <br>$(newnode).after(oldnode) <br>} <br></script> <br><div id="tab"> <br><a href='#'> a </a><a href='#'> b </a><a href='#'> c <a href="#" d></a><a href="#" e f</a></div>><a href='#' onclick="UpDown('up')">上一个</a> <br><a href='#' onclick="UpDown()">下一个</a> <br></body> <br></html> <br></a> </div>