Javascript if else problem
<p>My <code>if-else</code> is not working, I think that I have a variable issue. When I look at the value of <code>x</code> it is not what is entered in the text field. Any Ideas?</p>

<pre><code>function guess() {

    var x = document.getElementById("magic");

    var word = "please";
    if (x == word) {
        alert("You entered the magic word!");
    } else {
        alert("Please try again!");
    }
}

&lt;form&gt;
    What is the magic word?&lt;br /&gt;
    &lt;input type="text" id="magic" onchange="guess()" /&gt;
&lt;/form&gt;
</code></pre>
