output

output
HTML output Element
NOTE: This new element is HTML5 and will be a standardized element in 2014.

The HTML <output> element is used to render the results from calculations.

HTML CODE EXAMPLE
<input type="text" name="tf1" onchange="addNums()" size="2"> +
<input type="text" name="tf2" onchange="addNums()" size="2"> =
<output name="tf_result" for="tf1 tf2"></output>
<script type="application/javascript" language="javascript">
function addNums(){
  var num1 = Number(document.getElementsByName("tf1")[0].value);
  var num2 = Number(document.getElementsByName("tf2")[0].value);
  document.getElementsByName("tf_result")[0].innerHTML = num1+num2;
}
</script>
 click here to code.

Related Posts :

  • td td HTML td Element The HTML <td> table cell element is used to designate table cells in a… Read More...
  • tbody tbody HTML tbody Element The HTML <tbody> table row group element is used to group a bloc… Read More...
  • sub sup sub sup HTML sub sup Element The HTML <sub> and <sup> superscript and subscript ele… Read More...
  • table table HTML table Element The HTML <table> element is used to construct tables. Tables sho… Read More...
  • summary summary HTML summary Element NOTE: This new element is HTML5 and will be a standardized element… Read More...

0 Response to "output"

Post a Comment