A RetroSearch Logo

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

Search Query:

Showing content from http://developer.mozilla.org/de/docs/Web/API/HTMLProgressElement/max below:

HTMLProgressElement: max-Eigenschaft - Web-APIs | MDN

HTMLProgressElement: max-Eigenschaft

Baseline Widely available

Die max-Eigenschaft der HTMLProgressElement-Schnittstelle stellt die obere Grenze des Bereichs des <progress>-Elements dar.

Wert

Eine Fließkommazahl, die größer als null ist. Der Standardwert ist 1,0.

Beispiele HTML
Progress: <progress id="pBar"></progress> <span>0</span>%
JavaScript
const pBar = document.getElementById("pBar");
const span = document.getElementsByTagName("span")[0];

console.log(`Default value of max: ${pBar.max}`);

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);
Spezifikationen Browser-Kompatibilität MDN-Feedback-Box War diese Übersetzung hilfreich?

Diese Seite wurde automatisch aus dem Englischen übersetzt.


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