+ 2
How to add a responsive loader in website if loader is loaded then our website execute and not loaded it go on error page
Responsive loader, if it loaded then our website comes, if it not loaded it show like Google dregon page or error page
3 Antworten
+ 3
The browser allows us to track the loading of external resources – scripts, iframes, pictures and so on. Use can use JavaScript to create loader for your website. Basically there are two events for it: onload – successful load & onerror – an error occurred.
Loading a script
Let’s say we need to load a third-party script and call a function that resides there.
We can load it dynamically, like this:
```
let script = document.createElement('script');
script.src = "my.js";
document.head.append(script);
```
…But how to run the function that is declared inside that script? We need to wait until the script loads, and only then we can call it.
Fof further detail visit: https://javascript.info/onload-onerror
+ 2
It very helpful and I got my, so thank you very much 🙂
+ 2
Mukesh tak its my pleasure BRO 😍🖐