js:tips

Ceci est une ancienne révision du document !


TIPS

https://stackoverflow.com/questions/807878/how-to-make-javascript-execute-after-page-load

These solutions will work:

As mentioned in comments use defer:

<sxh js;>

<script src=“deferMe.js” defer></script>

or

<body onload=“script();”>

or

document.onload = function …

or even

window.onload = function … </shx>

Note that the last option is a better way to go since it is unobstrusive and is considered more standard.


You can do this using JavaScript or jQuery (a JavaScript library):

<script type="text/javascript" src="jquery.js"></script>          
<script type="text/javascript">
    // Check if the page has loaded completely                                         
    $(document).ready( function() { 
        $('#some_id').load('php-file.php'); 
    }); 
</script> 

  • js/tips.1647526023.txt
  • Dernière modification : 2022/03/17 15:07
  • de erreur32