لدى العديد من مواقع الويب وظيفة العودة إلى الأعلى للحكم على العرض الديناميكي وإخفاء معلمات التمرير ، والتي تعد أكثر ملاءمة للمبتدئين.
<! doctype html public "-// w3c // dtd xhtml 1.0 transitional // en" "http://www.w3 xmlns = "http://www.w3.org/1999/xhtml"> <head> <meta http-equiv = "content-type" content = "text/*html ؛ charset = utf-8"/> <title> تنفيذ DINDY DISPLAY إلى الأعلى أو ليس </titt {العرض: 45px ؛ الارتفاع: 45px ؛ الخلفية: url (back_top_new.png) 0 0 ؛ الموضع: ثابت ؛ اليسار: 50 ٪ ؛ الهامش-اليسار: 500px ؛ القاع: 105px ؛ عرض: لا شيء ؛ -46px ؛} </style> </head> <body> <a href = "javaScript: void (0)"> </a> <script src = "js/jquery -1.11.0.min.js"> </script> <script> var mousewhelevt = (/firefox/i.test ( "Dommescroll": "Mousewheel" ؛ // FF لا يتعرف على mousewheel اعتبارًا من ff3.xif (document.attachevent) // إذا كان IE (و Opera اعتمادًا على إعداد المستخدم) document.attachevent ("ON"+mousewheelevt ، function (e) {var t = document.body.scrolltop+document.documentElement.scrolltop ؛ if (t == 0) {$ (". back_top"). css ("display" ، "none") ؛ BrowsersDocument.AdDeventListener (MousewHelevt ، Function (E) {var t = document.body.scrolltop+document.documentElement.scrolltop ؛ if (t == 0) {$ (". back_top"). css ("display" ، "none") ؛} else {$ ("