How To Perform Any Action After Loading Webpage’s all element?

Use window.onload = function{//code} event for this.

<html>
<body>

	<iframe width="853" height="480" src="https://www.youtube.com/embed/HexFqifusOk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

<script>
window.onload = function()
{
	alert("Webpage Loaded Completely");
}
</script>
<body>
</html>

Leave a Comment