How to make the same line generated from the very beginning to the end of the HTML page using JS? 
like here, but even longer so that you have to scroll down for a long time.
How to make the same line generated from the very beginning to the end of the HTML page using JS? 
like here, but even longer so that you have to scroll down for a long time.
Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
const el = document.querySelector('#block') while (el.offsetHeight < window.innerHeight) { el.innerHTML += 'Строка <br>' } <div id="block"> </div> or
const el = document.querySelector('#block') while (el.offsetHeight < window.innerHeight) { el.textContent += 'Строка ' } <div id="block"> </div> Good luck!
UPDATE: Can be without a loop, if you use repeat
const el = document.querySelector('#block') const count = window.innerHeight / el.offsetHeight el.innerHTML = el.innerHTML.repeat(count) <div id="block"> Строка <br> </div> Source: https://ru.stackoverflow.com/questions/881500/
All Articles