多くのウェブサイトには、ダイナミックなディスプレイを判断し、スクロールパラメーターの隠れを判断する機能があります。これは初心者に適しています。
< xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-type" content = "text/html; charset = utf-8"/> <タイトル{width:45px; height:45px; background:url(back_top_new.png)0; position:sixt; left:50%; bottom:105px; display; -46px;} </style> </head> <body> <a href = "javascript:void(0)"> </a> <script src = "> js/jquery -1.11.0.min.js"> </script> <script> var mousewhileevt =(/navigator.useragent)? 「DommouseScroll」:「MouseWheel」; // ffはff3.xif(document.attachevent)のようにマウスホイールを認識しません// if ie(およびopera setting of user setting)document.attachevent( "on"+mousewheelevt、function(e){var t = document.body.scrolltop+document.documentelement.scrolltop; if(t == 0){$( "。back_top") browsersdocument.addeventlistener(mousewheelevt、function(e){var t = document.body.scrolltop+document.documentelement.scrolltop; if(t == 0){$( "。back_top")。css( "display"、 "none");} else {$( "。back_top")。css( "display"、 "block");}}