Hey there! I'm glad you like it. :)
The code that generates the dungeons is running on a server. When you visit the page or click the "give me another dungeon" link, all it does is request a new dungeon from the server. The server then does the random generation, lays out the diagram and sends it back to this page. That's why there's so little code -- it's all on the server.