Baseline Widely available
HTMLProgressElement
æ¥å£ç value
屿§è¡¨ç¤º <progress>
å
ç´ çå½åè¿åº¦ã
ä¸ä¸ªæµ®ç¹æ°ã妿æªå¨è¿åº¦æ¡ä¸è®¾ç½® max
å¼ï¼å该å¼çèå´å¨ 0.0 å 1.0 ä¹é´ãå¦æè®¾ç½®äº max
å¼ï¼å value
èå´å¨ 0
å max
ä¹é´ã
妿 HTMLProgressElement
å¯¹è±¡ä¸æªè®¾ç½® value
屿§ï¼åè¿åº¦æ¡ä»ç¶ä¸ç¡®å®ã
ç¡®å®çè¿åº¦æ¡ï¼<progress id="pBar"></progress> <span>0</span>%
<br />
ä¸ç¡®å®çè¿åº¦æ¡ï¼<progress></progress>
JavaScript
const pBar = document.getElementById("pBar");
const span = document.getElementsByTagName("span")[0];
pBar.max = 100;
pBar.value = 0;
setInterval(() => {
pBar.value = pBar.value < pBar.max ? pBar.value + 1 : 0;
span.textContent = Math.trunc(pBar.position * 100);
}, 100);
è§è æµè§å¨å
¼å®¹æ§
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4