Skip to main content
Convert Celsius to Fahrenheit using math object.
CODING:
<html>

  <script type="text/javascript">
  function round()
{
  var a=document.getElementById("one").value;
  var b=Math.round(a);
  document.getElementById("sec").value=b;
}
  </script>
  <body>
   <form>
   Enter Celsius Value:<input type="textbox" id="one"><br><br>
   Fahrenheit:<input type="textbox" id="sec"><br><br>
  <input type="button" value="Coverted" onclick="round();"/>
   </form>
  </body>
</html>

Comments