1window.addEventListener('load', (event) => {
2 console.log('page is fully loaded');
3});
1// without jQuery (doesn't work in older IEs)
2document.addEventListener('DOMContentLoaded', function(){
3 // your code goes here
4}, false);
5
1<!doctype html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <title>load demo</title>
6 <style>
7 body {
8 font-size: 12px;
9 font-family: Arial;
10 }
11 </style>
12 <script src="https://code.jquery.com/jquery-3.4.1.js"></script>
13</head>
14<body>
15
16<b>Projects:</b>
17<ol id="new-projects"></ol>
18
19<script>
20$( "#new-projects" ).load( "/resources/load.html #projects li" );
21</script>
22
23</body>
24</html>
25