1/** 2 * åå°é é¨å½å¼ 3 * æ¯æ´åçå¹³æ»æ²å 4 */ 5function scrollToTop() { 6 window.scrollTo({ 7 top: 0, 8 behavior: 'smooth' // å¹³æ»æ²åææ 9 }); 10} 11 12/** 13 * é²éåªåï¼æ²åä¸å®è·é¢å¾æé¡¯ç¤ºæé 14 * ç£è½è¦çªæ²åäºä»¶ 15 */ 16window.onscroll = function() { 17 var btn = document.getElementById("backToTopBtn"); 18 // ç¶æ²åè¶ é 300px æé¡¯ç¤ºæéï¼å¦åé±è 19 if (document.body.scrollTop > 300 || document.documentElement.scrollTop > 300) { 20 btn.style.opacity = "1"; 21 btn.style.display = "block"; 22 } else { 23 btn.style.opacity = "0"; 24 // å¦æä½ å¸æå®å ¨æ¶å¤±ä¸ä½ç©ºéï¼å¯ä»¥åæ¶è¨»è§£ä¸ä¸è¡ 25 // btn.style.display = "none"; 26 } 27};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.