Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php auto scoll page with output

<script>
var scroller = setInterval(function() {  
    window.scrollTo(0,document.body.scrollHeight);
}, 10); // update every 10 ms, change at will
</script>
<?php
// generate 1000 lines of html code
for($i=0; $i<1000; $i++){
    echo $i . "<br>";
    ob_flush(); // flush out the output as we go
    flush(); // same
    usleep(10000); // add some delay to see it in action  
}

?>

<script>
clearInterval(scroller); // stop updating so that you can scroll up 
</script>
Comment

PREVIOUS NEXT
Code Example
Php :: Internal error: xmlSchemaDocWalk, calling xmlSchemaValidateElem(). 
Php :: wordpress if is in categroy 
Php :: laravel migration column type json 
Php :: php get date using timezone 
Php :: Fetch Data From Database With MySQLI 
Php :: php append file 
Php :: php8.1 extensions 
Php :: how to style echo in php 
Php :: php string replace space 
Php :: how convert big text to array that text have br in laravel 
Php :: laravel gmail 
Php :: laravel download file 
Php :: get message validator failed laravel 
Php :: laravel get extension from url 
Php :: vc_map type number 
Php :: carbon laravel use 
Php :: InvalidArgumentException Unknown format "sentence" 
Php :: codeigniter 3 Configured database connection has cache enabled 
Php :: capitlise php 
Php :: the requested php extension ext-intl * is missing from your system ubuntu 
Php :: rus text check php 
Php :: how to check the size of mysql database in phpmyadmin 
Php :: strpos in python 
Php :: contact form 7 select disabled option 
Php :: php uuid generator 
Php :: get specific key value from array php 
Php :: laravel drop multiple columns 
Php :: php.ini location mac 
Php :: laravel 8 selecet the 2nd to the last record 
Php :: capitalize in php 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =