+ 1

Why isn't the temp conversion working for me

I just finished the web development fundamentals course and the last part didn't work for me. I've tried using it on replit, saving the files on my PC and opening them from there, and using a different browser. EDIT: I feel so dumb. I forgot to reference the JS and CSS in the HTML HTML: <form> <label for="celsius"> Celsius: </label> <input type="number" id="celsius" value="0"> <br><br> <label for="fahr">Fahrenheit</label> <input type="number" id="fahr" value="32"> </form> JS: window.onload = function(){ let c = document.getElementById("celsius"); let f = document.getElementById("fahr"); c.oninput = function(){ f.value = (c.value * 9/5) + 32; }; f.oninput = function(){ c.value = (f.value -32) * 5/9; }; };

15th Feb 2022, 8:04 PM
Dread
3 Réponses
0
It's working.. check again. Save in playground and share link here... Are you mean wrong output?
15th Feb 2022, 8:49 PM
Jayakrishna 🇮🇳
0
No, when I load it from replit or open the HTML file it doesn't change, I can set C to 40 and F will remain at 32
15th Feb 2022, 8:59 PM
Dread
0
Iam getting 104F on 40C without any changes...
15th Feb 2022, 9:26 PM
Jayakrishna 🇮🇳