<!DOCTYPE html> <html lang="en"> <head> <!--点击调到底部评论--> <script> function goBottom() { window.scrollTo(0, document.documentElement.scrollHeight-document.documentElement.clientHeight); } </script> <!--右边评论按钮--> <style type="text/css"> button { width: 50px; position: fixed; right: 0; top: 500px; display: none; } </style> </head> <body> {LB_3g首页推荐} <button id="top"> <span class="bottom-bar-item"><a href="javascript:void(0)" ><font size="3" color="#4F4F4F">评论</font></a></span> </button> <!--上拉显示评论按钮js--> <script> var scrollTop = document.documentElement.scrollTop || document.body.scrollTop; var top = document.getElementById("top"); window.onscroll = function () { var top = document.getElementById("top"); if (document.documentElement.scrollTop > 500 || document.body.scrollTop > 500) { top.style.display="block"; } else { top.style.display="none"; } } </script> </body> </html>
|