A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/HTMLProgressElement/position below:

HTMLProgressElement: position property - Web APIs

HTMLProgressElement: position property

Baseline Widely available

The position read-only property of the HTMLProgressElement interface returns current progress of the <progress> element.

Value

For determinate progress bar returns the result of current value divided by max value, i.e., a fraction between 0.0 and 1.0.

For indeterminate progress bar the value is always -1.

Examples HTML
Determinate Progress bar: <progress id="pBar"></progress> Position:
<span>0</span>
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 = pBar.position;
}, 100);
Specifications Browser compatibility

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