এলিমেন্ট (সাধারণত <body>) লোডিং সম্পূর্ণ হলে স্ক্রিপ্ট চালাতে onload অ্যাট্রিবিউট ব্যবহার করা হয়।
উদাহরণ
onload অ্যাট্রিবিউট বাস্তবায়নের উদাহরণ:
<!DOCTYPE html> <html> <head> <script> function display() { alert("Welcome!"); } </script> </head> <body onload = "display()"> <h3>Welcome to the website.</h3> <p>We offer learning content.</p> </body> </html>