Javascript: input and button. Function doesn't work -> Document.getElementById is not a function
<p>Simple Code:</p>

<pre><code>    &lt;div id="right"&gt;
        &lt;h2&gt;Zamiana jednostek temperatury&lt;/h2&gt;
        temperatura w &lt;sup&gt;o&lt;/sup&gt;Celsjusza&lt;br&gt;

        &lt;input type="text" id="cyfry" name="cyfry"&gt;&lt;br&gt;
        &lt;button onclick="fahrenheit()"&gt;Fahrenheit&lt;/button&gt;
        &lt;button onclick="kelwin()"&gt;Kelwin&lt;/button&gt;
        &lt;span id="wynik"&gt;&lt;/span&gt;
    &lt;/div&gt;
</code></pre>

<p>And Script:</p>

<pre><code>function fahrenheit(){
    var x=Document.getElementById("cyfry");
    parseInt(x);
    x = (x*1,8)+32;
    document.getElementById("wynik").innerHTML=x;
}
function kelwin(){
    var x=Document.getElementById("cyfry");
    parseInt(x);
    x = x + 273,15;
    document.getElementById("wynik").innerHTML=x;
}
</code></pre>

<p>As you can see all I want to do is convert units in Celsius to Fahrenheit or Calvins, but I get an error: </p>

<pre><code>Uncaught TypeError: Document.getElementById is not a function
    at fahrenheit (script.js:2)
    at HTMLButtonElement.onclick (index.html?cyfry=:32)
</code></pre>

<p>Thanks a lot in advance and Happy New Year!</p>

<p>After some changes I have problem that answer is always 40 in Fahrenheit and 15 on Calvin:</p>

<pre><code>function fahrenheit(){
    var x=document.getElementById("cyfry").value;
    parseFloat(x);
    var y = ((x*1,8)+32);
    document.getElementById("wynik").innerHTML=y;
}
function kelwin(){
    var a=document.getElementById("cyfry").value;
    parseFloat(a);
    var b = (a + 273,15);
    document.getElementById("wynik").innerHTML=b;
</code></pre>

<p>}</p>