ইউজার <details> এলিমেন্ট খোলা বা বন্ধ করলে ontoggle ইভেন্ট ফায়ার হয়।
উদাহরণ
ontoggle ইভেন্ট বাস্তবায়নের উদাহরণ:
<!DOCTYPE html> <html> <body> <h2>Details</h2> <p>You need to join office from Feb23<p> <details ontoggle="display()"> <summary>More Information</summary> <p>Timings: 9 to 5:30</p> <p>Office location: Hyderabad</p> </details> <script> function myFunction() { alert("Timings, office location, etc"); } </script> </body> </html>