JSFiddle - React, Tailwind, and code Playground

by bohdantheone

HTML

<html>
<head>
<script>
function changeResult(result){
  document.getElementById('to').value = result;
}

function calculateForm(){
  var d=document.getElementById('from').value;
  var k=document.getElementById('to').value;
  var result = Math.sqrt(Math.sin(3.2*Math.pow(d,2)));
  changeResult(result);
}
</script>
</head>
<body>
<!-- форма -->
<form name="calculator" method="post" >
<input type="text" name="number" id="from" size=20 value="25">
<input type="text" name="number" id="to" size=20 value="0">
</form>
<input type="button" onClick="calculateForm();" value="Розрахувати">
</body>
</html>