Code
Execute
<!DOCTYPE html> <html> <body> <details ontoggle="Wikitechy()"> <summary>Wikitechy</summary> <p>Tutorials.</p> <p>Articles</p> <p>Error and Fixes</p> <p>Interview tips</p> </details> <script> function Wikitechy() { alert("The ontoggle event is occurred"); } </script> </body> </html>
Result