0
Pls tell me what's wrong with this code 🙏
<DOCTYPE html> <html> <head> <title>rubbish</title> <style> html{ background-color: silver; } p{ background-color: color: } </style> </head> <body> <p>Input your value in fahrenheit to convert to degree Celsius</p><br /> <input id="test" /><br /> <button onclick="convert()"> CONVERT </button><br /> <p id="demo"> </p> <script> function convert(f){ return (5 / 9) * (f - 32); } document.getElementById("demo").innerHTML = convert(document.getElementById("test").value) + " is your answer in °C"; </script> </body> </html> Pls copy and paste on your playground, see the output and tell me what I did wrong Help a brother
3 Antworten