<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>*获取最後の一元素三种メソッド <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 href='#'> b </a><a href='#'> c </a><a href='#'> d </a><a href='#'> e </a><a href='#'> f </a></div> <br><a href='#' onclick="UpDown('up')">上一个</a> <br><a href='#' onclick="UpDown()">下一列</a> <br></body> <br></html> <br> </div>