$(selector).val()
$(selector).val(value)
$(selector).val(function(index,currentvalue))
<script>
$(document).ready(function(){
$("button").click(function(){
$("#txt").val("prova");
alert($("#txt").val());
});
});
</script>
<input type="text" id="txt">
<button>test</button>