diff options
Diffstat (limited to 'Base/home/anon/www/events.html')
-rw-r--r-- | Base/home/anon/www/events.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Base/home/anon/www/events.html b/Base/home/anon/www/events.html new file mode 100644 index 0000000000..42f6ed948b --- /dev/null +++ b/Base/home/anon/www/events.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html> + <head> + <script> + function foo() { + alert("It loaded!"); + } + document.addEventListener("DOMContentLoaded", foo); + + 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> |