summaryrefslogtreecommitdiff
path: root/Base/home/anon/www/events.html
blob: ed38a7178c5ee5622425c50ee18baa493accaa1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html>
<html>
    <head>
    <script>
        document.addEventListener("DOMContentLoaded", function() {
            alert("It loaded!");
        );

        function on_mousedown() {
            alert("Mouse down!");
        }

        function on_mousemove() {
            alert("Mouse move!");
        }

        document.getElementById("my_div").addEventListener("mousedown", on_mousedown);
        document.getElementById("my_div").addEventListener("mousemove", on_mousemove);
    </script>
    </head>
    <body>
        <div id="my_div">Hello there!</div>
    </body>
</html>