I am trying to get a temperature conversion caculator to work for me and I seem to be having a confusing problem. The html code below is what I'm needing to follow by.
<!DOCTYPE html>
<html>
<head>
<title>Temperature Converter</title>
</head>
<body>
<p>Enter a Temperature to Convert in the field below and select the starting scale.</p>
<input type="text" name="txtTemp" id="txtTemp" placeholder="Enter a Temperature" />
<br />
<br />
<input type="radio" id="radFahrenheit" name="radTemp" checked/>Fahrenheit to Celcius
<input type="radio" id="radCelcius" name="radTemp"/>Celcius to Fahrenheit
And with the javascript part I've gotten this so far also I'm not use to if and else statements yet.
function ConvertTemp(){
var radFahrenheit = parsefloat(document.getElementById('radFahrenheit').value);
var radCelcius = parsefloat(document.getElementById('radCelcius').value);
var txtTemp = document.getElementById('txtTemp');
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-47676.pdf
Comments
Leave a comment