how can i sum two numbers and show the result in alert windows {Html & Javascript} : <p>i have made a code but its shows the result in textfiled and i want it to show in
alert window {pop up window}
this is my code :</p>

<pre><code> &lt;html&gt;
  &lt;head&gt;
        &lt;title&gt;Input tutorial&lt;/title&gt;
        &lt;script language="javascript"&gt;
                function addNumbers()
                {
                        var val1 = parseInt(document.getElementById("value1").value);
                        var val2 = parseInt(document.getElementById("value2").value);
                        var ansD = document.getElementById("answer");
                        ansD.value = val1 + val2;
                }
        &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
        value1 = &lt;input type="text" id="value1" name="value1" value="1"/&gt;
        value2 = &lt;input type="text" id="value2" name="value2" value="2"/&gt;
        &lt;input type="button" name="Sumbit" value="Click here" onclick="javascript:addNumbers()"/&gt;
        Answer = &lt;input type="text" id="answer" name="answer" value=""/&gt;
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>
