Javascript doesn't update Inputs : <p>I'm trying to create some temperature converters, but i can't do it because innerHTML doesn't update the values in the Input Boxes.</p>

<p>I used some console.log to check for the values of valID and valNum, but both seemed ok, so i don't understand why the code doesn't work.</p>

<p>
</p>

<pre><code>&lt;body&gt;
    &lt;h2&gt;&lt;u&gt;Temperature Converter&lt;/u&gt;&lt;/h2&gt;

    &lt;p&gt;
        &lt;label&gt;Fahrenheit&lt;/label&gt;
        &lt;input id="fahrenheit" type="number" placeholder="Fahrenheit" onchange="tempConverter(this.id, this.value)" oninput="tempConverter(this.id, this.value)"&gt;
    &lt;/p&gt;

    &lt;p&gt;
        &lt;label&gt;Celsius&lt;/label&gt;
        &lt;input id="celsius" type="number" placeholder="Celsius" onchange="tempConverter(this.id, this.value)" oninput="tempConverter(this.id, this.value)"&gt;
    &lt;/p&gt;

    &lt;p&gt;
        &lt;label&gt;Kelvin&lt;/label&gt;
        &lt;input id="kelvin" type="number" placeholder="Kelvin" onchange="tempConverter(this.id, this.value)" oninput="tempConverter(this.id, this.value)"&gt;
    &lt;/p&gt;

    &lt;script&gt;
        function tempConverter(valID, valNum)
        {
            valNum = parseFloat(valNum);
            if (valID === "fahrenheit")
            {
                document.getElementById("celsius").innerHTML = (valNum - 32) / 1.8;
                document.getElementById("kelvin").innerHTML = ((valNum - 32) / 1.8) + 273.15;
            }
            if (valID === "celsius")
            {
                document.getElementById("fahrenheit").innerHTML = (valNum * 1.8) + 32;
                document.getElementById("kelvin").innerHTML = valNum + 273.15;
            }
            if (valID === "kelvin")
            {
                document.getElementById("fahrenheit").innerHTML = ((valNum - 273.15) * 1.8) + 32;
                document.getElementById("celsius").innerHTML = valNum - 273.15;
            }
        }
    &lt;/script&gt;
&lt;/body&gt;
</code></pre>

<p></p>
