편집 요약 없음 |
편집 요약 없음 태그: 되돌려진 기여 |
||
217번째 줄: | 217번째 줄: | ||
function myFunction() { | function myFunction() { | ||
var winScroll = document.getElementById('novel-content-main'). | var winScroll = document.getElementById('novel-content-main').clientTop; | ||
var height = document.getElementById('novel-content-main'). | var height = document.getElementById('novel-content-main').clientHeight; | ||
var scrolled = (winScroll / height) * 100; | var scrolled = (winScroll / height) * 100; | ||
document.getElementById('myBar').style.width = scrolled + '%'; | document.getElementById('myBar').style.width = scrolled + '%'; |