Insert form input value into href target URL with javascript
<p>I'm getting user input from a form and displaying this information in a span based on it's ID. How can I send this info to a  tag as well? I want this to display their email and make an mailto: link with the same input.</p>

<pre><code>    &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
    $(document).ready(function(){
    $("#email").keyup(update);
    });
    function update(){
    var email = $("#email").val();
    $('#DisplayEmail').html(email);
    }
    &lt;/script&gt;

    &lt;form&gt;
        &lt;input id="email" name="email" size="40" /&gt;
    &lt;/form&gt;

    &lt;a href="mailto:"&gt;&lt;span id="DisplayEmail"&gt;&lt;/span&gt;&lt;/a&gt;
</code></pre>
