Similar answer, but I just wanted to make it available for an easy/quick test.
var input = $("<input>")_x000D_
.attr("name", "mydata").val("go Rafa!");_x000D_
_x000D_
$('#easy_test').append(input);
_x000D_
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>_x000D_
_x000D_
_x000D_
_x000D_
<form id="easy_test">_x000D_
_x000D_
</form>
_x000D_