Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Click to get more donuts

Public visualization

Viewing a saved revision (read-only)

d98d49b7979a4e0c906b16152303b3e5

Click to get more donuts

0 stars0🌍 Public
Gguangxinhu
Last edited Sep 26, 2019
Created on Sep 26, 2019

Clicking the "Hungry" button appends a donut image to the page and updates a status message, demonstrating dynamic DOM insertion through JavaScript. The example uses `document.createElement` and `appendChild` to add an `<img>` element sourced from an external PNG URL (pngimg.com) after each click. The code references the tutorial "Adding and Removing Elements on the Fly Using JavaScript" and includes commented-out logic for removing elements, though the active interaction only adds donuts, not removes them. The visual result is a growing row of donut images below the text.

AI-generated description