This sort of resource makes it easy to develop a complete single web page within Moodle, especially when you are using Moodle's WYSIWYG HTML editor. The page is stored in the database, not as a file, and you have a lot of freedom to do almost anything you like using HTML, including Javascript.