Skip to content

Commit 9c6e816

Browse files
committed
Output Tag
1 parent d638933 commit 9c6e816

File tree

1 file changed

+6
-13
lines changed

1 file changed

+6
-13
lines changed

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,13 @@ value: If you don’t specify a value, the first numeric value inside the `<mete
8181
```
8282
**3.) output**: is meant to display text output. It indicates a section of the page that can be modified by a script (usually JavaScript).
8383
```html
84-
<output id = "myOutput">
85-
This is the original value
86-
</output>
87-
<button onclick = "changeOutput()">
88-
change the output
89-
</button>
90-
```
91-
When the button is pressed, it will call the changeOutput() JavaScript function, which could look like this:
92-
```javascript
93-
function changeOutput(){
94-
var myOutput = document.getElementById("myOutput");
95-
myOutput.value = "The value has changed";
96-
} // end changeOutput
84+
<form oninput="result.value=parseInt(a.value)+parseInt(b.value)">
85+
<input type="range" id="a" value="50"> +
86+
<input type="number" id="b" value="100"> =
87+
<output name="result" for="a b"></output>
88+
</form>
9789
```
90+
9891
**4.) progress**: indicates how much of a task has been completed (often marked as a percentage). It is expected to be modified through JavaScript code.
9992
```html
10093
<p>Now destroying the world. <br />

0 commit comments

Comments
 (0)