How to use the output tag?

Asked

Viewed 330 times

3

I copied this example from a website but it doesn’t work.

<form oninput="result.value=parseInt(a.value)+parseInt(b.value)">
 0<input type="range" name="b" value="50" />100 +<input type="number" name="a" value="10" /> =
 <output name="result"></output>
</form>
  • 1

    Works well for me: https://jsfiddle.net/516sr92d/ What does not work for you? Which browser are you using?

  • Here also worked as expected, Chrome, version 57.0.2987.133

  • Also works for me, remember that the support by browsers is currently limited. Take a look here: http://caniuse.com/#feat=html5semantic

  • My hole, I was testing it in my text editor, which I always tested code and it works, but this one didn’t, I posted it on the server and it worked,

  • 1

    Very interesting tag, unknown. When it was added?

  • I can’t say I took this link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output

  • @lazyFox are the new HTML 5 tags, check here https://www.w3schools.com/html/html5_semantic_elements.asp

  • W3schools: The output element is not supported in Edge 12 or Internet Explorer and earlier versions.

Show 3 more comments

1 answer

1


Most likely, your browser is outdated and not accepting <output>.

I recommend that you check the version of your browser to make sure that it supports this tag. At this link you can see the versions where the <output> is already supported and details: Browser Support

inserir a descrição da imagem aqui

Another possibility is your server is not accepting the tag; in some cases the tag is not working locally, this is due to different versions.

I recommend testing in other browsers and in different versions, as the most likely is the incompatibility of the browser.

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.