<script language="javascript"> var y = 0; var when = null; var ps = parent.mainframe;
function scrollMe() { if (document.all && y < ps.document.body.scrollHeight || y < ps.document.height) { ps.scroll(0,y); y = y + 4; when = setTimeout('scrollMe()',1); } }
function rollMe() { if (y >= 0) { ps.scroll(0,y) y = y - 4; when = setTimeout('rollMe()',1); } } function scrollUp() { if (document.all && y < ps.document.body.scrollHeight || y < ps.document.height) { ps.scroll(0,y); y = y + 8; } }
function scrollDown() { if (y >= 0) { ps.scroll(0,y) y = y - 8; } } function stopMe() {
clearTimeout(when); } function topMe() { ps.scroll(0,0); y = 0; }
function bopMe() { if (document.all) { ps.scroll(0,ps.document.body.scrollHeight); y = ps.document.body.scrollHeight; } else { ps.scroll(0,ps.document.height); y = ps.document.height; } } function action6(td) { td.src="img/rr6.gif" } function action7(td) { td.src="img/rr7.gif" } function action2(td) { td.src="img/rr2.gif" } function action3(td) { td.src="img/rr3.gif" } </script> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table width="20" border="0" cellspacing="0" cellpadding="0" height="100%" align="center"> <tr> <td background="aa/kuang22.gif" height="100%" valign="top"> <table width="20" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr> <td valign="top" height="35"> <img src="img/rr1.gif" alt="页面滚动到顶端" width="14" height="15" style="cursor:hand" onClick="topMe()"></td> </tr> <tr> <td valign="top"> <img src="img/rr2.gif" alt="向上滚动页面" width="16" height="16" style="cursor:hand" onMouseDown="rollMe()" onMouseUp="stopMe()" onMouseOver="action6(this)" onMouseOut="action2(this);stopMe()"></td> </tr> <tr> <td height="35" valign="top"> <img src="img/rr3.gif" alt="向下滚动页面" width="16" height="16" style="cursor:hand" onMouseDown="scrollMe();" onMouseUp="stopMe()" onMouseOver="action7(this)" onMouseOut="action3(this);stopMe()"> </td> </tr> </table> </td> </tr> <tr> <td valign="bottom" height="29"> <img src="img/kuang20.gif" onClick="bopMe()" style="cursor:hand" alt="页面滚动到底端" width="20" height="29"></td> </tr> </table> 用框架, 上面是代码