跳转到页顶或则页底
<HTML>
<HEAD>
<TITLE>测试<TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function Skip(str){
if('down'==str){
<!--
function Skip(str){
if('down'==str){
document.body.scrollTop=document.body.scrollHeight;//跳到网页尾部
}else{
document.body.scrollTop=0;//跳到网页尾部
}
}
}
//-->
</SCRIPT>
</HEAD>
</SCRIPT>
</HEAD>
<BODY >
<INPUT TYPE="submit" value="跳到页底" onClick="Skip('down');" >
<INPUT TYPE="submit" value="跳到页底" onClick="Skip('down');" >
<table width="200" border="1">
<tr height="3000">
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<tr height="3000">
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<INPUT TYPE="submit" value="跳到页头" onClick="Skip('up');">
</BODY>
</HTML>
</BODY>