🌍 Public
Viewing a saved revision (read-only)
7d3b71f727f94a62a15ee00c64043327
简易计时器
This example shows a simple timer interface with a text input displaying elapsed seconds and buttons for start, stop, and reset. The timer updates every second using `setInterval`, toggling an `index` flag to control whether the count increments. Clicking “开始” sets the flag to true, “停止” sets it to false, and “清零” resets both the counter and displayed value. The code directly manipulates the DOM via `document.getElementById` and `value` properties, without using a framework or external libraries.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.