🌍 Public
Viewing a saved revision (read-only)
1707e91cf7d14e49919f77f45dd01715
简易计时器
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.