<html> <head> <title>jQuery Function</title> <script src = "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function() { $("div").click(function() {alert("Hello, world!");}); }); </script> <style> #mydiv{ background: #FFFaaa; } </style> </head> <body> <div id = "mydiv"> Click on this to see a dialogue box. </div> </body> </html>
We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy. Accept Learn more