HTML <meter> form eigenschap
Definitie en gebruik
form
Eigenschap die definieert dat het <meter> element van het formulier behoort tot.
De waarde van deze eigenschap moet gelijk zijn aan die in hetzelfde document: De <form> element van de id-eigenschap.
Voorbeeld
De <meter> element buiten het formulier (maar nog steeds onderdeel ervan):
<form action="/action_page.php" method="get" id="form1"> First name: <input type="text" name="fname"><br> <input type="submit" value="Submit"> </form> <p><label for="anna">Xiao Ming's score:</label> <meter id="anna" form="form1" name="anna" min="0" low="40" high="90" max="100" value="95"></meter></p>
Syntax
<meter form="form_id">
Attribute value
Value | Description |
---|---|
form_id |
Specifies the form element to which the <meter> element belongs. The value of this attribute must be the id attribute of the <form> element in the same document. |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Not supported | Not supported | Not supported | Not supported | Not supported |