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.
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#email").keyup(update);
});
function update(){
var email = $("#email").val();
$('#DisplayEmail').html(email);
}
</script>
<form>
<input id="email" name="email" size="40" />
</form>
<a href="mailto:"><span id="DisplayEmail"></span></a>