Conversion from jQuery into JavaScript
<p>I've a script:</p>

<pre><code>&lt;form id="myform"&gt;
    &lt;input type="text" value="" id="input1"&gt;
    &lt;input type="text" value="" id="input2"&gt;
    &lt;input type="submit" value="submit"&gt;
&lt;/form&gt;
&lt;img id="image" src="http://mydomain.com/empty.gif" /&gt;
&lt;script&gt;
$(document).ready(function () {
    $("#myform").submit(function (ev) {
        ev.preventDefault();
        var val1 = $("#input1").val();
        var val1 = $("#input2").val();
        $("#image").attr("src", "http://mydomain.com/image?val1="+val1+"&amp;val2="+val2);
    });
});
&lt;/script&gt;
</code></pre>

<p>How would it look like if written in JavaScript?</p>
