Labels

Cerpen (18) html (16) movie (10) modul (7) SAP Security (2) c++ (2) Business (1)

Thursday, 25 February 2016

output based user input simple

simple code


<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<form onsubmit="return false" oninput="o.value = parseInt(a.value) + parseInt(b.value)">
  <input name="a" id="a" type="number" step="any"> +
  <input name="b" id="b" type="number" step="any"> =
  <output name="o" for="a b"></output>
</form>

</body>
</html>

No comments:

Post a Comment