diff --git a/WebNews/foucsreport.html b/WebNews/foucsreport.html index 66ac076..abf9955 100644 --- a/WebNews/foucsreport.html +++ b/WebNews/foucsreport.html @@ -113,7 +113,7 @@ }); Prostick = document.querySelector('.Prostick'); - totalHeight = document.body.scrollHeight - window.innerHeight; + totalHeight = document.documentElement.scrollHeight - window.innerHeight; }); window.addEventListener('scroll', function () { diff --git a/WebNews/index.html b/WebNews/index.html index fee5577..94c7d05 100644 --- a/WebNews/index.html +++ b/WebNews/index.html @@ -78,7 +78,7 @@ }); Prostick = document.querySelector('.Prostick'); - totalHight = document.body.scrollHeight - window.innerHeight; + totalHight = document.documentElement.scrollHeight - window.innerHeight; }); window.addEventListener('scroll', function () { diff --git a/WebNews/newsclass.html b/WebNews/newsclass.html index aacc848..97f1ec8 100644 --- a/WebNews/newsclass.html +++ b/WebNews/newsclass.html @@ -56,7 +56,7 @@ Prostick = document.querySelector('.Prostick'); - totalHight = document.body.scrollHeight - window.innerHeight; + totalHight = document.documentElement.scrollHeight - window.innerHeight; }); window.addEventListener('scroll', function () { let pro = (window.pageYOffset / totalHight) * 100; diff --git a/WebNews/newsinfo.html b/WebNews/newsinfo.html index 1856edc..d558eaa 100644 --- a/WebNews/newsinfo.html +++ b/WebNews/newsinfo.html @@ -36,7 +36,7 @@ Prostick = document.querySelector('.Prostick'); - totalHight = document.body.scrollHeight - window.innerHeight; + totalHight = document.documentElement.scrollHeight - window.innerHeight; }); window.addEventListener('scroll', function () { let pro = (window.pageYOffset / totalHight) * 100;